UNPKG

@arcgis/map-components

Version:
38 lines (37 loc) 1.6 kB
import { c as t } from "../../chunks/runtime.js"; import { usePropertyChange as s } from "@arcgis/lumina/controllers"; import e from "@arcgis/core/widgets/DistanceMeasurement2D.js"; import { LitElement as i, createEvent as o, noShadowRoot as a } from "@arcgis/lumina"; import { m as n } 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.33/esri/copyright.txt for details. v4.33.16 */ const c = r`@layer{arcgis-distance-measurement-2d{display:block}}`, h = n(e); class d extends i { constructor() { super(...arguments), this.widget = h(this), this.viewModel = this.widget.viewModel, this.autoDestroyDisabled = !1, this.icon = this.widget.icon, this.label = this.widget.label, this.position = "bottom-left", this.snappingOptions = this.widget.snappingOptions, this.state = this.viewModel.state, this.unit = this.widget.unit, this.unitOptions = this.widget.unitOptions, this.arcgisPropertyChange = s()("state"), this.arcgisReady = o(); } static { this.properties = { autoDestroyDisabled: 5, icon: 1, label: 1, position: 1, referenceElement: 1, snappingOptions: 0, state: 3, unit: 1, unitOptions: 0 }; } static { this.shadowRootOptions = a; } static { this.styles = c; } async clear() { this.viewModel?.clear(); } async destroy() { await this.manager.destroy(); } async start() { this.viewModel?.start(); } } t("arcgis-distance-measurement-2d", d); export { d as ArcgisDistanceMeasurement2d };