# FullscreenButtonViewModel

#### new Cesium.FullscreenButtonViewModel(fullscreenElement, container)
widgets/Source/FullscreenButton/FullscreenButtonViewModel.js 20

The view model for `FullscreenButton`.

Name | Type | Default | Description
--- | --- | --- | ---
`fullscreenElement` | Element | string | `document.body` | optional The element or id to be placed into fullscreen mode.
`container` | Element | string |  | optional The DOM element or ID that will contain the widget.

### Members

#### command : Command
widgets/Source/FullscreenButton/FullscreenButtonViewModel.js 123

Gets the Command to toggle fullscreen mode.

#### fullscreenElement : Element
widgets/Source/FullscreenButton/FullscreenButtonViewModel.js 101

Gets or sets the HTML element to place into fullscreen mode when the corresponding button is pressed.

#### isFullscreen : boolean
widgets/Source/FullscreenButton/FullscreenButtonViewModel.js 38

Gets whether or not fullscreen mode is active. This property is observable.

#### isFullscreenEnabled : boolean
widgets/Source/FullscreenButton/FullscreenButtonViewModel.js 51

Gets or sets whether or not fullscreen functionality should be enabled. This property is observable.

##### See:

- Fullscreen.enabled

#### tooltip : string
widgets/Source/FullscreenButton/FullscreenButtonViewModel.js 66

Gets the tooltip. This property is observable.

### Methods

#### destroy()
widgets/Source/FullscreenButton/FullscreenButtonViewModel.js 141

Destroys the view model. Should be called to properly clean up the view model when it is no longer needed.

#### isDestroyed() → boolean
widgets/Source/FullscreenButton/FullscreenButtonViewModel.js 133

##### Returns:

true if the object has been destroyed, false otherwise.

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.