[OpenLayers-Users] How to accomplish a click with a slight move (mousedown event)?

Nuno Magalhães nuno.magalhaes at inov.pt
Sun Feb 10 22:59:03 PST 2013


Good morning,

I've got an issue to report. Sometimes we want to give a mousemove upto
margin, between mousedown and mouseup so that it can be considered a click,
and for that reason I was trying to register on mousedown but it seems to
don't do anything.

map.events.register('mousedown', map,
function(e){console.log('mousedown');});
map.events.register('mousemove', map,
function(e){console.log('mousemove');});
map.events.register('mouseup', map, function(e){console.log('mouseup');});

Mousedown event won't work.
How to give priority/propagate from map to this event? Can someone show me
sample code?
...or give me alternatives to find if a click was inside a certain distance
in window pixels?

Thanks in advance,
Nuno.



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-accomplish-a-click-with-a-slight-move-mousedown-event-tp5033389.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list