UNPKG

@arcgis/map-components

Version:
41 lines (40 loc) 1.86 kB
import { c as e } from "../../chunks/runtime.js"; import { usePropertyChange as t } from "@arcgis/components-controllers"; import s from "@arcgis/core/widgets/Slice.js"; import { LitElement as i, createEvent as a, noShadowRoot as o } from "@arcgis/lumina"; import { m as l } from "../../chunks/useWidget.js"; import { css as r } from "@lit/reactive-element/css-tag.js"; /*! All material copyright Esri, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. v4.32.14 */ const d = r`@layer{arcgis-slice{display:block}}`, h = l(s); class c extends i { constructor() { super(...arguments), this.widget = h(this), this.viewModel = this.widget.viewModel, this.analysis = this.widget.analysis, this.autoDestroyDisabled = !1, this.excludeGroundSurface = this.viewModel.excludeGroundSurface, this.excludedLayers = this.viewModel.excludedLayers, this.headingLevel = this.widget.headingLevel, this.icon = this.widget.icon, this.label = this.widget.label, this.position = "bottom-left", this.shape = this.viewModel.shape, this.state = this.viewModel.state, this.tiltEnabled = this.viewModel.tiltEnabled, this.arcgisPropertyChange = t()("analysis", "state"), this.arcgisReady = a(); } static { this.properties = { analysis: 0, autoDestroyDisabled: 5, excludeGroundSurface: 5, excludedLayers: 0, headingLevel: 9, icon: 1, label: 1, position: 1, referenceElement: 1, shape: 0, state: 3, tiltEnabled: 5 }; } static { this.shadowRootOptions = o; } static { this.styles = d; } // #endregion // #region Public Methods async clear() { this.widget?.viewModel.clear(); } /** Permanently destroy the component */ async destroy() { await this.manager.destroy(); } async start() { this.widget?.viewModel.start(); } } e("arcgis-slice", c); export { c as ArcgisSlice };