@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.9 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{__decorate as t}from"tslib";import{clone as e}from"../core/lang.js";import{toPt as r}from"../core/screenUtils.js";import{property as s,subclass as o}from"../core/accessorSupport/decorators.js";import i from"./MarkerSymbol.js";import{urlPropertyDefinition as h,sourcePropertyDefinition as l}from"./support/urlUtils.js";import{enumeration as u}from"../core/accessorSupport/decorators/enumeration.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";var n;let c=n=class extends i{constructor(...t){super(...t),this.color=null,this.type="picture-marker",this.url=null,this.source=null}normalizeCtorArgs(t,e,s){if(t&&"string"!=typeof t&&null==t.imageData)return t;const o={};return t&&(o.url=t),null!=e&&(o.width=r(e)),null!=s&&(o.height=r(s)),o}get height(){return this._get("height")??12}set height(t){this._set("height",t)}readHeight(t,e){return e.size||t}get width(){return this._get("width")??12}set width(t){this._set("width",t)}readWidth(t,e){return e.size||t}get size(){return this._get("size")??null}set size(t){this._set("size",t)}clone(){const t=new n({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});return t._set("source",e(this.source)),t}hash(){return`${super.hash()}.${this.height}.${this.url}.${this.width}`}};t([s({json:{write:!1}})],c.prototype,"color",void 0),t([u({esriPMS:"picture-marker"},{readOnly:!0})],c.prototype,"type",void 0),t([s(h)],c.prototype,"url",void 0),t([s(l)],c.prototype,"source",void 0),t([s({type:Number,cast:r,json:{write:!0}})],c.prototype,"height",null),t([p("height",["height","size"])],c.prototype,"readHeight",null),t([s({type:Number,cast:r,json:{write:!0}})],c.prototype,"width",null),t([s({json:{write:!1}})],c.prototype,"size",null),c=n=t([o("esri.symbols.PictureMarkerSymbol")],c);export{c as default};