Optional
options: Partial<HandlerOptions>Property: active {Boolean}
APIProperty: control {<OpenLayers.Control>}. The control that initialized this handler. The control is assumed to have a valid map property - that map is used in the handler's own setMap method.
Property: evt {Event} This property references the last event handled by the handler. Note that this property is not part of the stable API. Use of the evt property should be restricted to controls in the library or other applications that are willing to update with changes to the OpenLayers code.
Property: id {String}
APIProperty: keyMask
{Integer} Use bitwise operators and one or more of the OpenLayers.Handler
constants to construct a keyMask. The keyMask is used by
Example: (code) // handler only responds if the Shift key is down handler.keyMask = OpenLayers.Handler.MOD_SHIFT;
// handler only responds if Ctrl-Shift is down
handler.keyMask = OpenLayers.Handler.MOD_SHIFT |
OpenLayers.Handler.MOD_CTRL;
(end)
Property: map {<OpenLayers.Map>}
Property: stopDown {Boolean} Stop propagation of mousedown events from getting to listeners on the same element. Default is true.
Property: touch {Boolean} Indicates the support of touch events. When touch events are started touch will be true and all mouse related listeners will do nothing.
APIMethod: activate Turn on the handler. Returns false if the handler was already active.
Returns: {Boolean} The handler was activated.
Method: callback Trigger the control's named callback with the given arguments
Parameters: name - {String} The key for the callback that is one of the properties of the handler's callbacks object. args - {Array(*)} An array of arguments (any type) with which to call the callback (defined by the control).
Method: checkModifiers
Check the keyMask on the handler. If no
Returns: {Boolean} The keyMask matches the keys down on an event.
APIMethod: deactivate Turn off the handler. Returns false if the handler was already inactive.
Returns: {Boolean} The handler was deactivated.
Method: destroy Deconstruct the handler.
Method: register register an event on the map
Method: setEvent With each registered browser event, the handler sets its own evt property. This property can be accessed by controls if needed to get more information about the event that the handler is processing.
This allows modifier keys on the event to be checked (alt, shift, ctrl, and meta cannot be checked with the keyboard handler). For a control to determine which modifier keys are associated with the event that a handler is currently processing, it should access (code)handler.evt.altKey || handler.evt.shiftKey || handler.evt.ctrlKey || handler.evt.metaKey(end).
Parameters: evt - {Event} The browser event.
Method: startTouch
Start touch events, this method must be called by subclasses in
"touchstart" method. When touch events are started
Method: unregister unregister an event from the map
Constructor: OpenLayers.Handler Construct a handler.
Parameters: control - {<OpenLayers.Control>} The control that initialized this handler. The control is assumed to have a valid map property; that map is used in the handler's own setMap method. If a map property is present in the options argument it will be used instead. callbacks - {Object} An object whose properties correspond to abstracted events or sequences of browser events. The values for these properties are functions defined by the control that get called by the handler. options - {Object} An optional object whose properties will be set on the handler.