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

# control.FullscreenControl

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

The "Fullscreen mode" control. You can set the z-index property of the map container for full-screen mode using the Map.options.fullscreenZIndex option. Key for the control in [control.storage](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.storage.md) — "fullscreenControl".

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

## Constructor {#constructor-summary}

```javascript
control.FullscreenControl([parameters])
```

**Parameters:**

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

Control parameters. ||
|| [`parameters.data`](#param-parameters.data) | — | Type: Object

Object describing the data of a control. ||
|| [`parameters.data.title`](#param-parameters.data.title) | — | Type: String

Text of the popup hint that appears when the mouse cursor hovers over the button. ||
|| [`parameters.options`](#param-parameters.options) | — | Type: Object

Control options. ||
|| [`parameters.options.adjustMapMargin`](#param-parameters.options.adjustMapMargin) | false | Type: Boolean

Whether the control registers its size in the map margins manager [map.margin.Manager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Manager.md). ||
|| [`parameters.options.float`](#param-parameters.options.float) | "right" | Type: String

The side to which you want to align the control. Can take three values: "left", "right" or "none". If set to "left" or "right", the controls are arranged one by one, starting from the left or right edge of the map, respectively. If set to "none", the controls are positioned according to the values of the left, right, bottom and top options, relative to the boundaries of the map. ||
|| [`parameters.options.floatIndex`](#param-parameters.options.floatIndex) | 300 | Type: Number

The priority of the control positioning. The element with highest priority is positioned closer to the map boundary that is specified in the float property. Does not work with float = "none". See also the description of the position option. ||
|| [`parameters.options.layout`](#param-parameters.options.layout) | — | Type: [ISelectableControlLayout](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControlLayout.md)\|String

Constructor of the control layout which implements the [ISelectableControlLayout](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControlLayout.md) interface or the layout key in the [layout.storage](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/layout.storage.md). The layout constructor is passed an object containing the fields: 
- control - Reference to the control.
- options - Options manager for the control.FullscreenControl.options.
- data - Data manager for the control.FullscreenControl.data control.
- state - Control state manager [control.FullscreenControl.state](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.FullscreenControl.md#state).
 The layout's outward appearance changes based on the control's data, state and options. The manager element, in turn, reacts to the layout's interface events. ||
|| [`parameters.options.maxWidth`](#param-parameters.options.maxWidth) | 28 | Type: Number\|Number[]

The maximum width of the control in different states. If a number is specified, it is assumed that the control has the same maximum dimensions in all states. If an array is specified, it will be interpreted as the maximum width in different states from the lesser to the greater. The number of states is set in the instance of the class [control.Manager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.Manager.md), which is usually a field of [Map.controls](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Map.md#controls), via the "states" option. By default, the controls have three states ['small', 'medium', 'large']. By default, the control does not change its size and always looks like a button with an icon. ||
|| [`parameters.options.position`](#param-parameters.options.position) | — | Type: Object

Object describing the position of a control. If the position option is set, the float option value is automatically treated as "none". ||
|| [`parameters.options.position.bottom`](#param-parameters.options.position.bottom) | 'auto' | Type: Number\|String

Position relative to the bottom edge of the map. ||
|| [`parameters.options.position.left`](#param-parameters.options.position.left) | 'auto' | Type: Number\|String

Position relative to the left edge of the map. ||
|| [`parameters.options.position.right`](#param-parameters.options.position.right) | 'auto' | Type: Number\|String

Position relative to the right edge of the map. ||
|| [`parameters.options.position.top`](#param-parameters.options.position.top) | 'auto' | Type: Number\|String

Position relative to the top edge of the map. ||
|| [`parameters.options.visible`](#param-parameters.options.visible) | true | Type: Boolean

Indicates if the control is displayed. ||
|| [`parameters.state`](#param-parameters.state) | — | Type: Object

Object describing the state of a control. ||
|| [`parameters.state.enabled`](#param-parameters.state.enabled) | true | Type: Boolean

Flags if the button is active. ||
|| [`parameters.state.selected`](#param-parameters.state.selected) | false | Type: Boolean

Flags if the button is pressed. ||
|#


**Example:**

```javascript
// Adding the control to the map and immediately switching it
// to the full-screen mode.
var fullscreenControl = new ymaps.control.FullscreenControl();
myMap.controls.add(fullscreenControl);
fullscreenControl.enterFullscreen();
```

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [data](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.Button.md#data) | [data.Manager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md)| Button data. Names of fields that are available via the data.Manager.get method: 
- image - Button icon, if available.
- content - Button content in HTML format.
- title - Text of the popup hint that appears when the mouse cursor hovers over the button.

Inherited from [control.Button](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.Button.md#data). ||
|| [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/IControl.md#options) | [IOptionManager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IOptionManager.md)| Options manager.

Inherited from [IControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IControl.md#options). ||
|| [press](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.Button.md#press) | | The event indicating that the button has been pressed. Unlike the click event, it is generated only if the state isEnabled == true. Instance of the Event class.

Inherited from [control.Button](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.Button.md#press). ||
|| [state](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.FullscreenControl.md#state) | [data.Manager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md)| State of the control. Names of fields that are available via the data.Manager.get method: 
- fullscreen — Flag for whether the map is in full-screen mode. ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [click](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.Button.md#event-click)| Clicking the button. Instance of the [Event](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

Inherited from [control.Button](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.Button.md#event-click). ||
|| [deselect](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-deselect)| The control is not selected.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-deselect). ||
|| [disable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-disable)| The control is unavailable.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-disable). ||
|| [enable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-enable)| The control is available.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-enable). ||
|| [fullscreenenter](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.FullscreenControl.md#event-fullscreenenter)| The map switched to fullscreen mode. Instance of the [Event](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. ||
|| [fullscreenexit](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.FullscreenControl.md#event-fullscreenexit)| The map exited full-screen mode. Instance of the [Event](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. ||
|| [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). ||
|| [select](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-select)| The control is selected.

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

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [deselect](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#deselect)() | | Cancels selection of the control (turns it off).

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#deselect). ||
|| [disable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#disable)() | | Makes the control unavailable (user actions are not allowed).

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#disable). ||
|| [enable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#enable)() | | Makes the control available (user actions are allowed).

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#enable). ||
|| [enterFullscreen](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.FullscreenControl.md#enterFullscreen)() | | Allows you to switch the map to full-screen mode. ||
|| [exitFullscreen](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.FullscreenControl.md#exitFullscreen)() | | Allows you to take the map out of full-screen mode. ||
|| [getMap](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.Button.md#getMap)() | [Map](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Map.md)
| Returns reference to the map.

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

Inherited from [IControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IControl.md#getParent). ||
|| [isEnabled](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#isEnabled)() | Boolean
| Returns true if the control is available, or false if it is unavailable.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#isEnabled). ||
|| [isSelected](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#isSelected)() | Boolean
| Returns true if the control is selected, or false if it is not selected.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#isSelected). ||
|| [select](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#select)() | | Selects (turns on) the control.

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

## Fields details {#field_detail}

### state {#state}

```javascript
{data.Manager} state
```

State of the control. Names of fields that are available via the data.Manager.get method: 
- fullscreen — Flag for whether the map is in full-screen mode.

## Events details {#event_detail}

### fullscreenenter {#fullscreenenter}


The map switched to fullscreen mode. Instance of the [Event](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

### fullscreenexit {#fullscreenexit}

The map exited full-screen mode. Instance of the [Event](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

## Methods details {#method_detail}

### enterFullscreen {#enterFullscreen}

```javascript
{} enterFullscreen()
```

Allows you to switch the map to full-screen mode.

### exitFullscreen {#exitFullscreen}

```javascript
{} exitFullscreen()
```

Allows you to take the map out of full-screen mode.