OpenLayers OpenLayers

Ticket #1101 (new feature)

Opened 10 months ago

Last modified 2 weeks ago

Drag-to-zoom should cancel on right-click

Reported by: agraves Assigned to:
Priority: minor Milestone: 2.7 Release
Component: Handler.Drag Version: 2.5
Keywords: Cc:
State:

Description

This is a bug in the "drag box zoom" behavior. When working properly, if a user holds the shift key, he can use the left mouse button to drag a box which indicates the region he'd like to zoom to.

I've found a bug where openlayers doesn't zoom, but leaves the box on top of the map forever (until a refresh.)

To reproduce this bug, do the following:

1) pull up a map 2) hold shift and drag a box....do not release! 3) while still holding left mouse and shift, right-click 4) release left mouse and shift

The box will stay there until you refresh the page.

Change History

10/22/07 12:07:53 changed by euzuro

  • owner changed.
  • component changed from general to Handler.Drag.

note that this is not limited to just zoom. it will be a problem with anything using the drag hander, i assume.

07/04/08 03:03:57 changed by euzuro

  • state changed.
  • milestone set to 2.7 Release.

08/01/08 18:03:28 changed by crschmidt

Certainly anything using the 'box' handler, though I'm not sure about anything using the 'drag' handler.

08/07/08 01:52:20 changed by openlayers

I guess it has to do with the drag handler since similar bug occurs while panning the map also. If you click the right button while panning, the panning sort of stops but the "pan cursor" will stay there and will not be changed back to normal.

The problem is that on right click the drag handler simply sets its 'started' etc. properties to false and doesn't do any cleaning up. Some kind of cancel-callback would probably be nice.

-ahn