[OpenLayers-Trac] [OpenLayers] #2936: Handler.Drag: Does not move until the cursor, and does not finish properly.

OpenLayers trac-20090302 at openlayers.org
Fri Nov 19 17:22:08 EST 2010


#2936: Handler.Drag: Does not move until the cursor, and does not finish properly.
--------------------------+-------------------------------------------------
 Reporter:  jorix         |       Owner:  jorix       
     Type:  bug           |      Status:  new         
 Priority:  minor         |   Milestone:  2.11 Release
Component:  Handler.Drag  |     Version:  2.10        
 Keywords:                |       State:              
--------------------------+-------------------------------------------------
 Using DragPan control, sometimes when the map is moved does not move to
 the place expected. This happens when we move fast and stop without
 releasing the mouse. Is easier to observe with large maps and slow
 browsers (e.g. IE) . This happens when property "interval" of Drag handler
 is greater that 0, to increase the performance.

 I saw the Handler.Drag ends in four ways (up, out, deactivate &
 simultaneous right click) but not in all cases does the same. Why? No
 reason, It is necessary to do the same in all four cases, otherwise
 unexpected behavior occurs (shows the cursor "move" after finishing with a
 right click; or can not select text using IE after right click or
 deactivate() because document.onselectstart = OpenLayers.Function.False)

 So the patch of this ticket proposes:
  * When the mouse is moved without releasing it produces a "move"
 deferred.
  * Use the same cancellation of "drag" on ending drag (in all four cases).

 The patch includes a detailed test.

 This also fixes ticket: #1101 and #2734 (patch proposed in #2734 is
 incomplete, fails the test)


 NOTE: With "documentDrag = true" can also occur behavioral problems. But
 his study is beyond the scope of this ticket.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2936>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list