Class: PointerInteraction

ol/interaction/Pointer~PointerInteraction


import PointerInteraction from 'ol/interaction/Pointer';

Base class that calls user-defined functions on down, move and up events. This class also manages "drag sequences".

When the handleDownEvent user function returns true a drag sequence is started. During a drag sequence the handleDragEvent user function is called on move events. The drag sequence ends when the handleUpEvent user function is called and returns false.

new PointerInteraction(opt_options)

interaction/Pointer.js, line 78
Name Type Description
options

Options.

Name Type Description
handleDownEvent function

Function handling "down" events. If the function returns true then a drag sequence is started.

handleDragEvent function

Function handling "drag" events. This function is called on "move" events during a drag sequence.

handleEvent function

Method called by the map to notify the interaction that a browser event was dispatched to the map. The function may return false to prevent the propagation of the event to other interactions in the map's interactions chain.

handleMoveEvent function

Function handling "move" events. This function is called on "move" events, also during a drag sequence (so during a drag sequence both the handleDragEvent function and this function are called).

handleUpEvent function

Function handling "up" events. If the function returns false then the current drag sequence is stopped.

stopDown function

Should the down event be propagated to other interactions, or should be stopped?