UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 2.29 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 e}from"../chunks/tslib.es6.js";import o from"../Color.js";import{JSONMap as r}from"../core/jsonMap.js";import{clone as t}from"../core/lang.js";import{toPt as s}from"../core/screenUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{enumeration as l}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../core/accessorSupport/decorators/writer.js";import n from"./MarkerSymbol.js";import c from"./SimpleLineSymbol.js";var h;const m=new r({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let u=h=class extends n{constructor(...e){super(...e),this.color=new o([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new c}normalizeCtorArgs(e,o,r,t){if(e&&"string"!=typeof e)return e;const i={};return e&&(i.style=e),null!=o&&(i.size=s(o)),r&&(i.outline=r),t&&(i.color=t),i}writeColor(e,o){e&&"x"!==this.style&&"cross"!==this.style&&(o.color=e.toJSON()),null===e&&(o.color=null)}set path(e){this.style="path",this._set("path",e)}clone(){return new h({angle:this.angle,color:t(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${this.outline?.hash()}`}};e([i()],u.prototype,"color",void 0),e([a("color")],u.prototype,"writeColor",null),e([l({esriSMS:"simple-marker"},{readOnly:!0})],u.prototype,"type",void 0),e([i()],u.prototype,"size",void 0),e([i({type:m.apiValues,json:{read:m.read,write:m.write}})],u.prototype,"style",void 0),e([i({type:String,json:{write:!0}})],u.prototype,"path",null),e([i({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":c}},json:{default:null,write:!0}})],u.prototype,"outline",void 0),u=h=e([p("esri.symbols.SimpleMarkerSymbol")],u);export{u as default};