@arcgis/map-components
Version:
ArcGIS Map Components
59 lines (58 loc) • 3.28 kB
JavaScript
import { c as t } from "../../chunks/runtime.js";
import { usePropertyChange as a } from "@arcgis/components-controllers";
import s from "@arcgis/core/layers/OrientedImageryLayer.js";
import r from "@arcgis/core/widgets/OrientedImageryViewer.js";
import { LitElement as o, createEvent as d, noShadowRoot as n } from "@arcgis/lumina";
import { m as l } from "../../chunks/useWidget.js";
import { css as g } 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 = g` {arcgis-oriented-imagery-viewer{display:block}}`, m = l(r);
class y extends o {
constructor() {
super(...arguments), this.widget = m(this), this._hasOrientedImageryLayerToAdd = !1, this.viewModel = this.widget.viewModel, this.autoDestroyDisabled = !1, this.currentCoverageVisible = this.widget.currentCoverageVisible, this.dataCaptureEnabled = this.widget.dataCaptureEnabled, this.disabled = this.widget.disabled, this.galleryOpened = this.widget.galleryOpened, this.icon = this.widget.icon, this.imageEnhancementToolActive = this.widget.imageEnhancementToolActive, this.imageGalleryEnabled = this.widget.imageGalleryEnabled, this.isAdditionalCoverageVisible = this.widget.isAdditionalCoverageVisible, this.isAdditionalPointSourcesVisible = this.widget.isAdditionalPointSourcesVisible, this.label = this.widget.label, this.layer = this.widget.layer, this.mapImageConversionToolState = this.widget.mapImageConversionToolState, this.navigationToolActive = this.widget.navigationToolActive, this.position = "bottom-left", this.referencePoint = this.widget.referencePoint, this.arcgisPropertyChange = a()("imageGalleryEnabled", "layer"), this.arcgisReady = d();
}
static {
this.properties = { autoDestroyDisabled: 5, currentCoverageVisible: 5, dataCaptureEnabled: 5, disabled: 5, galleryOpened: 5, icon: 1, imageEnhancementToolActive: 5, imageGalleryEnabled: 4, isAdditionalCoverageVisible: 5, isAdditionalPointSourcesVisible: 5, label: 1, layer: 0, mapImageConversionToolState: 5, navigationToolActive: 5, orientedImageryLayerItemId: 1, position: 1, referenceElement: 1, referencePoint: 0 };
}
static {
this.shadowRootOptions = n;
}
static {
this.styles = h;
}
//#endregion
//#region Public Methods
/** Permanently destroy the component */
async destroy() {
await this.manager.destroy();
}
//#endregion
//#region Lifecycle
willUpdate(e) {
if (e.has("orientedImageryLayerItemId")) {
const i = this.orientedImageryLayerItemId;
i && this.widget && (this.layer = new s({
portalItem: {
id: i
}
}), this.widget.view ? this.widget.view.map.add(this.layer) : this._hasOrientedImageryLayerToAdd = !0);
}
}
loaded() {
this._hasOrientedImageryLayerToAdd && (this.widget.view ? this._onReady() : this.el.addEventListener("arcgisReady", () => {
this._onReady();
}, { once: !0 }));
}
//#endregion
//#region Private Methods
_onReady() {
const { layer: e } = this;
e && (this.widget.view?.map.add(e), this._hasOrientedImageryLayerToAdd = !1);
}
}
t("arcgis-oriented-imagery-viewer", y);
export {
y as ArcgisOrientedImageryViewer
};