You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
2.5 KiB
8 lines
2.5 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("../chunks/tslib.es6 ./Analysis ./LineOfSightAnalysisObserver ./LineOfSightAnalysisTarget ../core/Collection ../core/collectionUtils ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../geometry/projection ../geometry/support/aaBoundingBox ../support/elevationInfoUtils".split(" "),function(d,b,p,q,r,l,m,e,z,A,B,t,u,h,v){const k=r.ofType(q);b=class extends b{constructor(a){super(a);this.type= |
|
"line-of-sight";this.extent=this.observer=null}initialize(){this.addHandles(m.watch(()=>this._computeExtent(),a=>{null==a?.pending&&this._set("extent",null!=a?a.extent:null)},m.syncAndInitial))}get targets(){return this._get("targets")||new k}set targets(a){this._set("targets",l.referenceSetter(a,this.targets,k))}get spatialReference(){return null!=this.observer?.position?this.observer.position.spatialReference:null}get requiredPropertiesForEditing(){return[this.observer?.position]}async waitComputeExtent(){const a= |
|
this._computeExtent();return null!=a?a.pending:Promise.resolve()}_computeExtent(){var a=this.spatialReference;if(null==this.observer?.position||null==a)return null;const n=f=>"absolute-height"===v.getGeometryEffectiveElevationMode(f.position,f.elevationInfo);var c=this.observer.position;c=h.fromValues(c.x,c.y,c.z,c.x,c.y,c.z);for(const f of this.targets)if(null!=f.position){const g=u.projectOrLoad(f.position,a);if(null!=g.pending)return{pending:g.pending,extent:null};if(null!=g.geometry){const {x:w, |
|
y:x,z:y}=g.geometry;h.expandWithVec3(c,[w,x,y])}}a=h.toExtent(c,a);n(this.observer)&&this.targets.every(n)||(a.zmin=void 0,a.zmax=void 0);return{pending:null,extent:a}}clear(){this.observer=null;this.targets.removeAll()}};d.__decorate([e.property({type:["line-of-sight"]})],b.prototype,"type",void 0);d.__decorate([e.property({type:p,json:{read:!0,write:!0}})],b.prototype,"observer",void 0);d.__decorate([e.property({cast:l.castForReferenceSetter,type:k,nonNullable:!0,json:{read:!0,write:!0}})],b.prototype, |
|
"targets",null);d.__decorate([e.property({value:null,readOnly:!0})],b.prototype,"extent",void 0);d.__decorate([e.property({readOnly:!0})],b.prototype,"spatialReference",null);d.__decorate([e.property({readOnly:!0})],b.prototype,"requiredPropertiesForEditing",null);return b=d.__decorate([t.subclass("esri.analysis.LineOfSightAnalysis")],b)}); |