[OpenLayers-Trac] Re: [OpenLayers] #1791: ZoomBox drag wonky with left-right mouse clicks.

OpenLayers trac-20090302 at openlayers.org
Sat Feb 12 14:23:17 EST 2011


#1791: ZoomBox drag wonky with left-right mouse clicks.
--------------------------------------------+-------------------------------
 Reporter:  dzwarg                          |       Owner:              
     Type:  bug                             |      Status:  new         
 Priority:  minor                           |   Milestone:  2.11 Release
Component:  examples                        |     Version:  2.7         
 Keywords:  zoombox drag right mousebutton  |       State:              
--------------------------------------------+-------------------------------

Comment(by ossipoff):

 The bug occurs because the up callback of the Drag handler is never called
 when a right click occurs during a drag, since a right click sets the
 started property to false.
 The attached 1791.patch overcomes this by not resetting the started
 property on right click and only call the up callback when left mouse
 button is released.
 Since the drag handler only handles left click drags this is, in my
 opinion, acceptable behavior.
 The patch also ensures that the zoomBox div of the Box handler is reused
 if it already exists. This way ZoomBox control will never leave div's
 floating in the DOM tree, that it doesn't have a handle to.
 The above changes also meant that a few changes had to be made to unit
 tests, since these were not simulating left clicks under all
 circumstances.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/1791#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list