You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
3.2 KiB
10 lines
3.2 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("../chunks/tslib.es6 ../core/lang ../core/Logger ../core/urlUtils ../core/accessorSupport/decorators/property ../core/has ../core/accessorSupport/decorators/enumeration ../core/accessorSupport/decorators/subclass ./Symbol3DLayer ./support/colors ./support/IconSymbol3DLayerResource ./support/materialUtils ./support/Symbol3DAnchorPosition2D ./support/Symbol3DIconOutline ./support/Symbol3DMaterial".split(" "),function(c,h,t,u,f,b,m,v,w,k,x,y,n,z,A){function p(a){const d="width"in a?a.width:a.size, |
|
e="height"in a?a.height:a.size,l=q(a.xoffset);a=q(a.yoffset);return(l||a)&&d&&e?{x:-l/d,y:a/e}:null}function q(a){return isFinite(a)?a:0}var g;b=g=class extends w{constructor(a){super(a);this.resource=this.material=null;this.type="icon";this.size=12;this.anchor="center";this.outline=this.anchorPosition=null}clone(){return new g({anchor:this.anchor,anchorPosition:h.clone(this.anchorPosition),enabled:this.enabled,material:h.clone(this.material),outline:h.clone(this.outline),resource:h.clone(this.resource), |
|
size:this.size})}static fromSimpleMarkerSymbol(a){const d=a.color||k.white,e=p(a),l=a.outline&&0<a.outline.width?{size:a.outline.width,color:(a.outline.color||k.white).clone()}:null;var B=g,C=a.size;{a=a.style;const r=D[a];r?a=r:(t.getLogger("esri.symbols.IconSymbol3DLayer").warn(`${a} cannot be mapped to Icon symbol. Fallback to "circle"`),a="circle")}return new B({size:C,resource:{primitive:a},material:{color:d},outline:l,anchor:e?"relative":void 0,anchorPosition:e})}static fromPictureMarkerSymbol(a){const d= |
|
!a.color||k.isBlack(a.color)?k.white:a.color,e=p(a);return new g({size:a.width<=a.height?a.height:a.width,resource:{href:a.url},material:{color:d.clone()},anchor:e?"relative":void 0,anchorPosition:e})}static fromCIMSymbol(a){return new g({resource:{href:u.makeData({mediaType:"application/json",data:JSON.stringify(a.data)})}})}};c.__decorate([f.property({type:A.Symbol3DMaterial,json:{write:!0}})],b.prototype,"material",void 0);c.__decorate([f.property({type:x.IconSymbol3DLayerResource,json:{write:!0}})], |
|
b.prototype,"resource",void 0);c.__decorate([m.enumeration({Icon:"icon"},{readOnly:!0})],b.prototype,"type",void 0);c.__decorate([f.property(y.screenSizeProperty)],b.prototype,"size",void 0);c.__decorate([m.enumeration({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"}),f.property({json:{default:"center"}})],b.prototype,"anchor",void 0);c.__decorate([f.property({type:n.Symbol3DAnchorPosition2D, |
|
json:{type:[Number],read:{reader:a=>new n.Symbol3DAnchorPosition2D({x:a[0],y:a[1]})},write:{writer:(a,d)=>{d.anchorPosition=[a.x,a.y]},overridePolicy(){return{enabled:"relative"===this.anchor}}}}})],b.prototype,"anchorPosition",void 0);c.__decorate([f.property({type:z.Symbol3DIconOutline,json:{write:!0}})],b.prototype,"outline",void 0);b=g=c.__decorate([v.subclass("esri.symbols.IconSymbol3DLayer")],b);const D={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle", |
|
path:null};return b}); |