OpenLayers.Handler.MouseWheel

Handler for wheel up/down events.

Inherits from

Summary
OpenLayers.Handler.MouseWheelHandler for wheel up/down events.
Properties
wheelListener{function}
mousePosition{OpenLayers.Pixel} mousePosition is necessary because evt.clientX/Y is buggy in Moz on wheel events, so we cache and use the value from the last mousemove.
Constructor
OpenLayers.Handler.MouseWheel
Functions
destroy
onWheelEventCatch the wheel event and handle it xbrowserly
wheelZoomGiven the wheel event, we carry out the appropriate zooming in or out, based on the ‘wheelDelta’ or ‘detail’ property of the event.
mousemoveUpdate the stored mousePosition on every move.
activate
deactivate

Properties

wheelListener

{function}

mousePosition

{OpenLayers.Pixel} mousePosition is necessary because evt.clientX/Y is buggy in Moz on wheel events, so we cache and use the value from the last mousemove.

Constructor

OpenLayers.Handler.MouseWheel

Parameters

control{OpenLayers.Control}
callbacks{Object} An object containing a single function to be called when the drag operation is finished.  The callback should expect to recieve a single argument, the point geometry.
options{Object}

Functions

destroy

destroy: function()

onWheelEvent

onWheelEvent: function(e)

Catch the wheel event and handle it xbrowserly

Parameters

e{Event}

wheelZoom

wheelZoom: function(e)

Given the wheel event, we carry out the appropriate zooming in or out, based on the ‘wheelDelta’ or ‘detail’ property of the event.

Parameters

e{Event}

mousemove

mousemove: function (evt)

Update the stored mousePosition on every move.

Parameters

evt{Event} The browser event

Returns

{Boolean} Allow event propagation

activate

activate: function (evt)

deactivate

deactivate: function (evt)
This class represents a screen coordinate, in x and y coordinates
destroy: function()
onWheelEvent: function(e)
Catch the wheel event and handle it xbrowserly
wheelZoom: function(e)
Given the wheel event, we carry out the appropriate zooming in or out, based on the ‘wheelDelta’ or ‘detail’ property of the event.
mousemove: function (evt)
Update the stored mousePosition on every move.
activate: function (evt)
deactivate: function (evt)
Base class to construct a higher-level handler for event sequences.
Controls affect the display or behavior of the map.
Close