Handler for wheel up/down events.
ALKMaps. | Handler for wheel up/down events. |
Properties | |
wheelListener | {function} |
mousePosition | {ALKMaps.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 | |
ALKMaps. | |
Functions | |
destroy | |
onWheelEvent | Catch the wheel event and handle it xbrowserly |
wheelZoom | Given the wheel event, we carry out the appropriate zooming in or out, based on the ‘wheelDelta’ or ‘detail’ property of the event. |
mousemove | Update the stored mousePosition on every move. |
activate | |
deactivate |
{ALKMaps.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.
control | {ALKMaps.Control} |
callbacks | {Object} An object containing a single function to be called when the drag operation is finished. The callback should expect to receive a single argument, the point geometry. |
options | {Object} |
destroy: function()
Catch the wheel event and handle it xbrowserly
onWheelEvent: 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.
wheelZoom: function( e )
Update the stored mousePosition on every move.
mousemove: function ( evt )
activate: function ( evt )
deactivate: function ( evt )