UNPKG

@arcgis/map-components

Version:
47 lines (46 loc) 1.68 kB
import { c as t } from "../../chunks/runtime.js"; import { usePropertyChange as s } from "@arcgis/components-controllers"; import i from "@arcgis/core/widgets/LineOfSight.js"; import { LitElement as e, createEvent as o, noShadowRoot as a } from "@arcgis/lumina"; import { m as r } from "../../chunks/useWidget.js"; import { css as n } 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.13 */ const l = n`@layer{arcgis-line-of-sight{display:block}}`, h = r(i); class c extends e { constructor() { super(...arguments), this.widget = h(this), this.viewModel = this.widget.viewModel, this.analysis = this.widget.analysis, this.autoDestroyDisabled = !1, this.icon = this.widget.icon, this.label = this.widget.label, this.position = "bottom-left", this.state = this.viewModel.state, this.arcgisPropertyChange = s()("analysis", "state"), this.arcgisReady = o(); } static { this.properties = { analysis: 0, autoDestroyDisabled: 5, icon: 1, label: 1, position: 1, referenceElement: 1, state: 3 }; } static { this.shadowRootOptions = a; } static { this.styles = l; } // #endregion // #region Public Methods async clear() { this.widget?.viewModel.clear(); } async continue() { this.widget?.viewModel.continue(); } /** Permanently destroy the component */ async destroy() { await this.manager.destroy(); } async start() { this.widget?.viewModel.start(); } async stop() { this.widget?.viewModel.stop(); } } t("arcgis-line-of-sight", c); export { c as ArcgisLineOfSight };