Analysis.js 1.5 KB

12345
  1. /*
  2. All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. See https://js.arcgis.com/4.25/esri/copyright.txt for details.
  4. */
  5. import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Accessor.js";import{ClonableMixin as r}from"../core/Clonable.js";import{IdentifiableMixin as s}from"../core/Identifiable.js";import{JSONSupportMixin as o}from"../core/JSONSupport.js";import{isSome as i}from"../core/maybe.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/accessorSupport/ensureType.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";let n=0,l=class extends(o(r(s(t)))){constructor(e){super(e),this.id=`${Date.now().toString(16)}-analysis-${n++}`,this.title=null}get parent(){return this._get("parent")}set parent(e){const t=this.parent;if(i(t))switch(t.type){case"line-of-sight":case"dimension":t.releaseAnalysis(this);break;case"2d":case"3d":t.analyses.includes(this)&&t.analyses.remove(this)}this._set("parent",e)}get isEditable(){return this.requiredPropertiesForEditing.every(i)}};e([p({type:String,constructOnly:!0,clonable:!1})],l.prototype,"id",void 0),e([p({type:String})],l.prototype,"title",void 0),e([p({constructOnly:!0})],l.prototype,"type",void 0),e([p({clonable:!1,value:null})],l.prototype,"parent",null),e([p({readOnly:!0})],l.prototype,"isEditable",null),e([p({readOnly:!0})],l.prototype,"requiredPropertiesForEditing",void 0),l=e([a("esri.analysis.Analysis")],l);const c=l;export{c as default};