UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

3 lines (2 loc) 1.64 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{__decorate as t}from"tslib";import{lengthDimensionMeasureType as e}from"./dimensionUtils.js";import{Clonable as o}from"../core/Clonable.js";import{cyclicalDegrees as i}from"../core/Cyclical.js";import{JSONSupportMixin as r}from"../core/JSONSupport.js";import{equalsMaybe as s}from"../core/maybe.js";import{property as n,cast as p,subclass as l}from"../core/accessorSupport/decorators.js";import{ensureNumber as a}from"../core/accessorSupport/ensureType.js";import u from"../geometry/Point.js";let m=class extends(r(o)){constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType="direct",this.offset=0,this.orientation=0}get valid(){return null!=this.startPoint&&null!=this.endPoint}equals(t){return this===t||s(this.startPoint,t.startPoint)&&s(this.endPoint,t.endPoint)&&this.measureType===t.measureType&&this.offset===t.offset&&this.orientation===t.orientation}};t([n({type:["length"],json:{write:{isRequired:!0}}})],m.prototype,"type",void 0),t([n({type:u,json:{write:{isRequired:!0}}})],m.prototype,"startPoint",void 0),t([n({type:u,json:{write:{isRequired:!0}}})],m.prototype,"endPoint",void 0),t([n({type:e,nonNullable:!0,json:{write:{isRequired:!0}}})],m.prototype,"measureType",void 0),t([n({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],m.prototype,"offset",void 0),t([n({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),p(t=>i.normalize(a(t),0,!0))],m.prototype,"orientation",void 0),t([n({readOnly:!0})],m.prototype,"valid",null),m=t([l("esri.analysis.LengthDimension")],m);export{m as default};