Documentation
Reference
2.1.56 (current version)
collection
interactivityModel
Interfaces

IBehavior

Extends IChildOnMap, ICustomizable.

Map behavior. Adds a map reaction to certain user actions (such as dragging, right-click zooming, or multitouch). The default behavior is disabled and can be enabled using the "enable" method.

Constructor | Fields | Events | Methods

Constructor

IBehavior([options])

Parameters:

ParameterDefault valueDescription
options

Type: Object

Behavior options.

Fields

NameTypeDescription
eventsIEventManager

Event manager.

Inherited from IEventEmitter.

optionsIOptionManager

Options manager.

Inherited from ICustomizable.

Events

NameDescription
disable

Disabling behaviors.

enable

Enabling behaviors.

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.

enable()

Enables the behavior.

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.

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.

Events details

disable

Disabling behaviors.

enable

Enabling behaviors.

Methods details

disable

{} disable()

Disables the behavior.

enable

{} enable()

Enables the behavior.

isEnabled

{Boolean} isEnabled()

Checks whether the behavior is enabled.

Returns true if the behavior is enabled, otherwise false.