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 s from"./Analysis.js";import t from"./LengthDimension.js";import o from"../core/Collection.js";import{castForReferenceSetter as n,referenceSetter as i}from"../core/collectionUtils.js";import{isNone as r,isSome as p}from"../core/maybe.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";const a=o.ofType(t);let d=class extends s{constructor(e){super(e),this.type="dimensioning",this.nonEditableMessage="Assign start and end points to all dimensions to allow editing."}get dimensions(){return this._get("dimensions")||new a}set dimensions(e){this._set("dimensions",i(e,this.dimensions,a))}get extent(){return this.dimensions.reduce(((e,s)=>r(e)?p(s.extent)?s.extent.clone():null:p(s.extent)?e.union(s.extent):e),null)}get requiredPropertiesForEditing(){return this.dimensions.reduce(((e,s)=>(e.push(s.startPoint,s.endPoint),e)),[])}clear(){this.dimensions.removeAll()}};e([l({type:["dimensioning"]})],d.prototype,"type",void 0),e([l({cast:n,type:a,nonNullable:!0})],d.prototype,"dimensions",null),e([l({readOnly:!0})],d.prototype,"extent",null),e([l({readOnly:!0})],d.prototype,"requiredPropertiesForEditing",null),e([l({readOnly:!0})],d.prototype,"nonEditableMessage",void 0),d=e([m("esri.analysis.DimensioningAnalysis")],d);const c=d;export{c as default};
|