---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/behavior.DblClickZoom.md
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/behavior.DblClickZoom.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt

# behavior.DblClickZoom

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

The "zooming the map with double-click" behavior.

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

## Constructor {#constructor-summary}

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

**Parameters:**

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

Options. ||
|| [`options.centering`](#param-options.centering) | true | Type: Boolean

If true, the map is zoomed on double-click so that the point under the mouse cursor becomes the map center; if false, the point under the mouse cursor stays in the same position when zooming on double-click. ||
|| [`options.duration`](#param-options.duration) | 200 | Type: Number

Duration of animation for zooming on double-click (0 - no animation). ||
|| [`options.useMapMargin`](#param-options.useMapMargin) | true | Type: Boolean

When centering, whether to consider margins that were calculated in the margins manager [map.margin.Manager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Manager.md). ||
|#


## Fields {#properties-summary}

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

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

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

## Events {#events-summary}

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

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

Inherited from [IBehavior](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IBehavior.md#event-enable). ||
|| [optionschange](https://yandex.com.tr/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.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange). ||
|| [parentchange](https://yandex.com.tr/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.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChild.md#event-parentchange). ||
|#

## Methods {#methods-summary}

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

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

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