@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.37 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{_ as e}from"../chunks/tslib.es6.js";import s from"./support/AnalysisOriginWebScene.js";import r from"../core/Accessor.js";import t from"../core/Clonable.js";import o from"../core/Identifiable.js";import i from"../core/JSONSupport.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";let p=0,l=class extends(i.JSONSupportMixin(t.ClonableMixin(o.IdentifiableMixin(r)))){constructor(e){super(e),this.id=`${Date.now().toString(16)}-analysis-${p++}`,this.origin=null}get parent(){return this._get("parent")}set parent(e){const s=this.parent;if(null!=s)switch(s.type){case"line-of-sight":case"dimension":case"viewshed":s.releaseAnalysis(this);break;case"2d":case"3d":s.analyses.includes(this)&&s.analyses.remove(this)}this._set("parent",e)}equals(e){return!0}};e([n({type:String,constructOnly:!0,clonable:!1})],l.prototype,"id",void 0),e([n({clonable:!1,value:null})],l.prototype,"parent",null),e([n({types:{key:"type",base:null,typeMap:{"web-scene":s}}})],l.prototype,"origin",void 0),l=e([a("esri.analysis.Analysis")],l);export{l as default};