OpenLayers OpenLayers

Ticket #1339 (closed feature: fixed)

Opened 10 months ago

Last modified 9 months ago

enabling and disabling mouse wheel on Navigation control

Reported by: sbenthall Assigned to: sbenthall
Priority: minor Milestone: 2.6 Release
Component: Control.Navigation Version: 2.5
Keywords: Cc:
State: Complete

Description

There should be an easy way to disable and enable the mouse wheel/zoom handler on the Navigation control when, for example, you want to use the mouse wheel on a DOM element that's positioned over the map.

Attachments

Navigation.js.patch (0.7 kB) - added by sbenthall on 02/08/08 12:14:58.
patch for Control.Navigation
zoomwheel.patch (3.3 kB) - added by crschmidt on 03/06/08 23:34:22.
patch-1339-r6458-A0.diff (4.7 kB) - added by elemoine on 03/07/08 15:51:21.

Change History

02/08/08 12:14:58 changed by sbenthall

  • attachment Navigation.js.patch added.

patch for Control.Navigation

02/08/08 12:15:09 changed by sbenthall

  • state set to Review.

02/08/08 16:37:28 changed by sbenthall

Patch needs to be changed to set a property so that when the Navigation control is deactivated and activated, this wheel deactivation state sticks

02/08/08 17:27:34 changed by crschmidt

  • state changed from Review to Needs More Work.

02/08/08 23:34:28 changed by crschmidt

  • milestone changed from 2.6 Release to 2.7 Release.

02/15/08 12:54:22 changed by tschaub

  • milestone changed from 2.7 Release to 2.6 Release.

I think this is pretty critical for use with #926. I'd consider it a bug if we release popups with scrolling content that result in map zooming when the user tries to scroll with a wheel.

02/29/08 03:24:18 changed by crschmidt

Although we've fixed the issues for #926 in a different way, we still need to have a way to create a navigation control with no wheeling before 2.6.

03/06/08 23:34:22 changed by crschmidt

  • attachment zoomwheel.patch added.

03/06/08 23:36:04 changed by crschmidt

  • state changed from Needs More Work to Review.
  • APIProperty: zoomWheelEnabled
  • Method: enableZoomWheel
  • Method: disableZoomWheel

Includes code + example demonstrating usage.

Note that the code doesn't protect the 'disable' calls in various places: this is intentional, as there is no reason to stop a deactivate() from turning off the wheelzoom -- only an activate from turning it on, if zoomWheelEnabled is set to false.

03/07/08 15:51:21 changed by elemoine

  • attachment patch-1339-r6458-A0.diff added.

03/07/08 15:54:23 changed by elemoine

  • state changed from Review to Commit.

patch-1339-r6458-A0.diff adds tests for the two new methods.

crschmidt, feel free to commit if you're okay with my tests and if all unit tests pass. Thanks.

PS: for some reason the HTML preview of my patch isn't available!

03/07/08 18:04:32 changed by crschmidt

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [6462]) Add improved navigation control support for disabling zooming with the mousewheel. Original from sbenthall (yay), example and more code from me, tests from elem. r=elemoine. (Closes #1339)