UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 2.48 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as r}from"../chunks/tslib.es6.js";import{JSONMap as o}from"../core/jsonMap.js";import{clone as t}from"../core/lang.js";import{toPt as e}from"../core/screenUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{enumeration as i}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import n from"./LineSymbol.js";import a from"./LineSymbolMarker.js";var h;const p=new o({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let m=h=class extends n{constructor(...r){super(...r),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(r,o,t,s,i,l){if(r&&"string"!=typeof r)return r;const n={};return null!=r&&(n.style=r),null!=o&&(n.color=o),null!=t&&(n.width=e(t)),null!=s&&(n.cap=s),null!=i&&(n.join=i),null!=l&&(n.miterLimit=e(l)),n}clone(){return new h({color:t(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:this.marker?.clone()})}hash(){return`${super.hash()}.${this.color?.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${this.marker?.hash()}`}};r([i({esriSLS:"simple-line"},{readOnly:!0})],m.prototype,"type",void 0),r([s({type:p.apiValues,json:{read:p.read,write:p.write}})],m.prototype,"style",void 0),r([s({type:["butt","round","square"],json:{write:{overridePolicy:(r,o,t)=>({enabled:"round"!==r&&null==t?.origin})}}})],m.prototype,"cap",void 0),r([s({type:["miter","round","bevel"],json:{write:{overridePolicy:(r,o,t)=>({enabled:"round"!==r&&null==t?.origin})}}})],m.prototype,"join",void 0),r([s({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":a}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],m.prototype,"marker",void 0),r([s({type:Number,json:{read:!1,write:!1}})],m.prototype,"miterLimit",void 0),m=h=r([l("esri.symbols.SimpleLineSymbol")],m);export{m as default};