---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/behavior.Drag.md
  - https://yandex.com/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/behavior.Drag.md
---
# behavior.Drag

Extends [IBehavior](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md).

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

[Constructor](#constructor-summary) | [Fields](#properties-summary) | [Events](#events-summary) | [Methods](#methods-summary)

## Constructor {#constructor-summary}

```javascript
behavior.Drag([options])
```

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`options`](#param-options) | — | Type: Object

Options. ||
|| [`options.actionCursor`](#param-options.actionCursor) | 'grabbing' | Type: String

Cursor for the behavior [behavior.Drag](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/behavior.Drag.md) when dragging the map. ||
|| [`options.cursor`](#param-options.cursor) | 'grab' | Type: String

Cursor for the behavior [behavior.Drag](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/behavior.Drag.md) when pointing at the map. ||
|| [`options.inertia`](#param-options.inertia) | true | Type: Boolean

Enables kinetic inertia at the end of dragging. ||
|| [`options.inertiaDuration`](#param-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`](#param-options.tremor) | 2 | Type: Integer

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


## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [events](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events) | [IEventManager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventManager.md)| Event manager.

Inherited from [IEventEmitter](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events). ||
|| [options](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#options) | [IOptionManager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IOptionManager.md)| Options manager.

Inherited from [ICustomizable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#options). ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [disable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#event-disable)| Disabling behaviors.

Inherited from [IBehavior](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#event-disable). ||
|| [enable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#event-enable)| Enabling behaviors.

Inherited from [IBehavior](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#event-enable). ||
|| [optionschange](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange)| Change to the object options.

Inherited from [ICustomizable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange). ||
|| [parentchange](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChild.md#event-parentchange)| The parent object reference changed.

Data fields:

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

Inherited from [IChild](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChild.md#event-parentchange). ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [disable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#disable)() | | Disables the behavior.

Inherited from [IBehavior](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#disable). ||
|| [enable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#enable)() | | Enables the behavior.

Inherited from [IBehavior](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#enable). ||
|| [getParent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#getParent)() | [IParentOnMap](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IParentOnMap.md)\|null
| Returns link to the parent object, or null if the parent element was not set.

Inherited from [IChildOnMap](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#getParent). ||
|| [isEnabled](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#isEnabled)() | Boolean
| Checks whether the behavior is enabled.

Inherited from [IBehavior](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#isEnabled). ||
|| [setParent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent)([parent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent-param-parent)) | [IChildOnMap](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md)
| 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](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent). ||
|#
