@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.93 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 t}from"../chunks/tslib.es6.js";import{LengthDimensionMeasureType as o,lengthDimensionMeasureType as e}from"./dimensionUtils.js";import r from"../core/Clonable.js";import{cyclicalDegrees as s}from"../core/Cyclical.js";import i from"../core/JSONSupport.js";import{equalsMaybe as n}from"../core/maybe.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{cast as a}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{ensureNumber as m}from"../core/accessorSupport/ensureType.js";import u from"../geometry/Point.js";let c=class extends(i.JSONSupportMixin(r)){constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType=o.Direct,this.offset=0,this.orientation=0}get valid(){return null!=this.startPoint&&null!=this.endPoint}equals(t){return this===t||n(this.startPoint,t.startPoint)&&n(this.endPoint,t.endPoint)&&this.measureType===t.measureType&&this.offset===t.offset&&this.orientation===t.orientation}};t([p({type:["length"],json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),t([p({type:u,json:{write:{isRequired:!0}}})],c.prototype,"startPoint",void 0),t([p({type:u,json:{write:{isRequired:!0}}})],c.prototype,"endPoint",void 0),t([p({type:e,nonNullable:!0,json:{write:{isRequired:!0}}})],c.prototype,"measureType",void 0),t([p({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],c.prototype,"offset",void 0),t([p({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),a((t=>s.normalize(m(t),0,!0)))],c.prototype,"orientation",void 0),t([p({readOnly:!0})],c.prototype,"valid",null),c=t([l("esri.analysis.LengthDimension")],c);export{c as default};