UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

94 lines (92 loc) 4.83 kB
import type Widget from "./Widget.js"; import type FullscreenViewModel from "./Fullscreen/FullscreenViewModel.js"; import type { Icon } from "@esri/calcite-components/components/calcite-icon"; import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js"; import type { WidgetProperties } from "./Widget.js"; import type { FullscreenViewModelProperties } from "./Fullscreen/FullscreenViewModel.js"; export interface FullscreenProperties extends WidgetProperties, Partial<Pick<Fullscreen, "element" | "view">> { /** * Icon displayed in the widget's button. * * @default "zoom-out-fixed" * @since 4.27 * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/) * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/) */ icon?: Icon["icon"] | null; /** * The widget's default label. * * @since 4.11 */ label?: string | null; /** * The view model for this widget. This is a class that contains all the logic * (properties and methods) that controls this widget's behavior. See the * [FullscreenViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Fullscreen/FullscreenViewModel/) class to access * all properties and methods on the widget. */ viewModel?: FullscreenViewModelProperties; } /** * Provides a simple widget to present the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/) or a user-defined [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) using the entire screen. * * > [!WARNING] * > * > **Note:** * > * > The default background color of the view in fullscreen mode is black. * > The background color can be changed in css using `.esri-view:fullscreen` selector. * > The background color defined on `.esri-view` and [WebMap.initialViewProperties](https://developers.arcgis.com/javascript/latest/references/core/WebMap/#initialViewProperties) will also be used in fullscreen mode. * * > [!WARNING] * > * > **Known Limitations** * > * > The Fullscreen widget only works with browsers that implement * > the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API). Thus, iOS Safari is not supported. * * @deprecated since version 4.32. Use the [Fullscreen component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-fullscreen/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). * @since 4.6 * @see [Sample - Animate opacity visual variable](https://developers.arcgis.com/javascript/latest/sample-code/visualization-vv-opacity-animate/) * @see [Sample - Animate color visual variable](https://developers.arcgis.com/javascript/latest/sample-code/visualization-vv-color-animate/) * @see [FullscreenViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Fullscreen/FullscreenViewModel/) * @see [DefaultUI](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/) * @example * fullscreen = new Fullscreen({ * view: view * }); * view.ui.add(fullscreen, "top-right"); */ export default class Fullscreen extends Widget { constructor(properties?: FullscreenProperties); /** The [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) to present in fullscreen mode. */ accessor element: HTMLElement | null | undefined; /** * Icon displayed in the widget's button. * * @default "zoom-out-fixed" * @since 4.27 * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/) * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/) */ get icon(): Icon["icon"]; set icon(value: Icon["icon"] | null | undefined); /** * The widget's default label. * * @since 4.11 */ get label(): string; set label(value: string | null | undefined); /** A reference to the [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). Set this to link the widget to a specific view. */ accessor view: MapViewOrSceneView | null | undefined; /** * The view model for this widget. This is a class that contains all the logic * (properties and methods) that controls this widget's behavior. See the * [FullscreenViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Fullscreen/FullscreenViewModel/) class to access * all properties and methods on the widget. */ get viewModel(): FullscreenViewModel; set viewModel(value: FullscreenViewModelProperties); }