OpenLayers OpenLayers

Ticket #2162 (new feature)

Opened 8 months ago

Add pixel tolerance to Drag handler

Reported by: mmeno Assigned to:
Priority: minor Milestone: 2.9 Release
Component: general Version: 2.7
Keywords: Cc: frozenpoint@gmail.com
State:

Description

Using OpenLayers-2.7 on a touchscreen interface exacerbates the problem of click vs drag. Frequently a users finger rolls a few pixels when they're trying to click on a feature and it ends up as a drag event instead of a click event.

I added a pixelTolerance field (as in the Click.js handler) to the Drag handler so these click events could be propagated while allowing some slop in the click. Attached is a -p0 patch that does this (essentially a copy/paste of the Click handler's code for the same).

Attachments

openlayers_dragtolerance.diff (1.2 kB) - added by mmeno on 06/26/09 13:22:10.

Change History

06/26/09 13:22:10 changed by mmeno

  • attachment openlayers_dragtolerance.diff added.