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.
interval{Integer} In order to increase server performance, an interval (in milliseconds) can be set to reduce the number of up/down events called.
delta{Integer} When interval is set, delta collects the mousewheel z-deltas of the events that occur within the interval.
cumulative{Boolean} When interval is set: true to collect all the mousewheel z-deltas, false to only record the delta direction (positive or negative)
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.

interval

{Integer} In order to increase server performance, an interval (in milliseconds) can be set to reduce the number of up/down events called.  If set, a new up/down event will not be set until the interval has passed.  Defaults to 0, meaning no interval.

delta

{Integer} When interval is set, delta collects the mousewheel z-deltas of the events that occur within the interval.  See also the cumulative option

cumulative

{Boolean} When interval is set: true to collect all the mousewheel z-deltas, false to only record the delta direction (positive or negative)

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