UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 2.21 kB
/* 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 s}from"../core/screenUtils.js";import{property as o,subclass as r}from"../core/accessorSupport/decorators.js";import i from"./FillSymbol.js";import{urlPropertyDefinition as l,sourcePropertyDefinition as h}from"./support/urlUtils.js";import{enumeration as u}from"../core/accessorSupport/decorators/enumeration.js";var p;let f=p=class extends i{constructor(...t){super(...t),this.color=null,this.type="picture-fill",this.url=null,this.xscale=1,this.yscale=1,this.source=null}normalizeCtorArgs(t,e,o,r){if(t&&"string"!=typeof t&&null==t.imageData)return t;const i={};return t&&(i.url=t),e&&(i.outline=e),null!=o&&(i.width=s(o)),null!=r&&(i.height=s(r)),i}get width(){return this._get("width")??12}set width(t){this._set("width",t)}get height(){return this._get("height")??12}set height(t){this._set("height",t)}get xoffset(){return this._get("xoffset")??0}set xoffset(t){this._set("xoffset",t)}get yoffset(){return this._get("yoffset")??0}set yoffset(t){this._set("yoffset",t)}clone(){const t=new p({color:e(this.color),height:this.height,outline:e(this.outline),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});return t._set("source",e(this.source)),t}hash(){return`${super.hash()}.${this.color?.hash()}.${this.height}.${this.url}.${this.width}.${this.xoffset}.${this.xscale}.${this.yoffset}.${this.yscale}`}};t([o({json:{write:!1}})],f.prototype,"color",void 0),t([u({esriPFS:"picture-fill"},{readOnly:!0})],f.prototype,"type",void 0),t([o(l)],f.prototype,"url",void 0),t([o({type:Number,json:{write:!0}})],f.prototype,"xscale",void 0),t([o({type:Number,json:{write:!0}})],f.prototype,"yscale",void 0),t([o({type:Number,cast:s,json:{write:!0}})],f.prototype,"width",null),t([o({type:Number,cast:s,json:{write:!0}})],f.prototype,"height",null),t([o({type:Number,cast:s,json:{write:!0}})],f.prototype,"xoffset",null),t([o({type:Number,cast:s,json:{write:!0}})],f.prototype,"yoffset",null),t([o(h)],f.prototype,"source",void 0),f=p=t([r("esri.symbols.PictureFillSymbol")],f);export{f as default};