Documentation
Reference
2.1.50 (current version)
collection
interactivityModel
Interfaces
2.1.52 (release candidate)
collection
interactivityModel
Interfaces

behavior.Drag

Extends IBehavior.

The "dragging the map using the mouse or single touch" behavior.

Constructor | Fields | Events | Methods

Constructor

behavior.Drag([options])

Parameters:

ParameterDefault valueDescription
options

Type: Object

Options.

options.actionCursor 'grabbing'

Type: String

Cursor for the behavior behavior.Drag when dragging the map.

options.cursor 'grab'

Type: String

Cursor for the behavior behavior.Drag when pointing at the map.

options.inertia true

Type: Boolean

Enables kinetic inertia at the end of dragging.

options.inertiaDuration 400

Type: Number|String

Duration of inertia, in ms. The "auto" string value sets the duration of inertia proportional to the distance.

options.tremor 2

Type: Integer

Minimal cursor movement after pressing the mouse button, before the map begins to move.

Fields

NameTypeDescription
eventsIEventManager

Event manager.

Inherited from IEventEmitter.

optionsIOptionManager

Options manager.

Inherited from ICustomizable.

Events

NameDescription
disable

Disabling behaviors.

Inherited from IBehavior.

enable

Enabling behaviors.

Inherited from IBehavior.

optionschange

Change to the object options.

Inherited from ICustomizable.

parentchange

The parent object reference changed.

Data fields:

  • oldParent - Old parent.
  • newParent - New parent.

Inherited from IChild.

Methods

NameReturnsDescription
disable()

Disables the behavior.

Inherited from IBehavior.

enable()

Enables the behavior.

Inherited from IBehavior.

getParent()

IControlParent|null

Returns link to the parent object, or null if the parent element was not set.

Inherited from IChildOnMap.

isEnabled()

Boolean

Checks whether the behavior is enabled.

Inherited from IBehavior.

setParent(parent)

IChildOnMap

Sets the parent object. If the null value is passed, the manager element will only be deleted from the current parent object.

Inherited from IChildOnMap.