12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.24/esri/copyright.txt for details.
- */
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../analysis/LineOfSightAnalysis.js";import s from"../analysis/LineOfSightAnalysisObserver.js";import r from"../analysis/LineOfSightAnalysisTarget.js";import i from"../core/Collection.js";import{isSome as o,applySome as a}from"../core/maybe.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{watch as l,syncAndInitial as p}from"../core/reactiveUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import h from"./Layer.js";import{OperationalLayer as m}from"./mixins/OperationalLayer.js";const u=i.ofType(r);let d=class extends(m(n(h))){constructor(e){super(e),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new t,this.opacity=1}initialize(){this.own(l((()=>this.analysis),((e,t)=>{o(t)&&t.parent===this&&(t.parent=null),o(e)&&(e.parent=this)}),p))}async load(){return o(this.analysis)&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return a(this.analysis,(e=>e.observer))}set observer(e){a(this.analysis,(t=>t.observer=e))}get targets(){return o(this.analysis)?this.analysis.targets:null}set targets(e){a(this.analysis,(t=>t.targets=e))}get fullExtent(){return o(this.analysis)?this.analysis.extent:null}get spatialReference(){return o(this.analysis)?this.analysis.spatialReference:null}removeAnalysis(e){this.analysis===e&&(this.analysis=new t)}};e([y({json:{read:!1},readOnly:!0})],d.prototype,"type",void 0),e([y({type:["LineOfSightLayer"]})],d.prototype,"operationalLayerType",void 0),e([y({type:s,json:{read:!0,write:{ignoreOrigin:!0}}})],d.prototype,"observer",null),e([y({type:u,json:{read:!0,write:{ignoreOrigin:!0}}})],d.prototype,"targets",null),e([y({nonNullable:!0,json:{read:!1,write:!1}})],d.prototype,"analysis",void 0),e([y({readOnly:!0})],d.prototype,"fullExtent",null),e([y({readOnly:!0})],d.prototype,"spatialReference",null),e([y({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],d.prototype,"opacity",void 0),e([y({type:["show","hide"]})],d.prototype,"listMode",void 0),d=e([c("esri.layers.LineOfSightLayer")],d);const f=d;export{f as default};
|