@arcgis/map-components
Version:
ArcGIS Map Components
38 lines (37 loc) • 1.66 kB
JavaScript
import { c as t } from "../../chunks/runtime.js";
import { usePropertyChange as e } from "@arcgis/components-controllers";
import s from "@arcgis/core/widgets/AreaMeasurement2D.js";
import { LitElement as i, 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 h = n` {arcgis-area-measurement-2d{display:block}}`, m = r(
// Workaround for https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/61559
s
);
class p extends i {
constructor() {
super(...arguments), this.widget = m(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 = e()("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 = h;
}
// #endregion
// #region Public Methods
/** Permanently destroy the component */
async destroy() {
await this.manager.destroy();
}
}
t("arcgis-area-measurement-2d", p);
export {
p as ArcgisAreaMeasurement2d
};