Custom Gis Application with Arcgis Javascript API with modern layouting
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.
 
 

9 lines
3.0 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/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../geometry/support/aaBoundingRect ../../widgets/support/widgetUtils ../../widgets/support/jsxFactory".split(" "),function(d,b,e,p,q,r,n,f,t,h){b=class extends b{constructor(a){super(a);this.coordinates=void 0;this.strokeDash=[];this.strokeWidth=1;this.strokeColor=[0,0,0,1];this.strokeDashColor=[255,
255,255,1];this.fillColor=[0,0,0,0];this.isDecoration=this.visible=!0}get _strokeStyle(){const a=this.strokeColor;return`rgba(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]})`}get _strokeBackgroundStyle(){const a=this.strokeDashColor;return`rgba(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]})`}get _fillStyle(){const a=this.fillColor;return`rgba(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]})`}get _renderCoordinates(){const a=[];if(!this.coordinates)return{coordinates:a,rect:f.negativeInfinity};const c=f.pad(f.expandWithNestedArray(f.create(f.negativeInfinity),
this.coordinates),2*this.strokeWidth);c[0]=Math.floor(c[0]);c[1]=Math.floor(c[1]);c[2]=Math.ceil(c[2]+.5);c[3]=Math.ceil(c[3]+.5);for(const g of this.coordinates)a.push([Math.floor(g[0]-c[0])+.5,Math.floor(g[1]-c[1])+.5]);a.reverse();return{coordinates:a,rect:c}}render(){const {coordinates:a,rect:c}=this._renderCoordinates,g=f.width(c),m=f.height(c);return h.tsx("div",{classes:{"esri-outline-overlay-item":!0},styles:{left:c[0]+"px",top:c[1]+"px",width:g+"px",height:m+"px",visibility:this.visible?
"visible":"hidden"}},h.tsx("svg",{height:m,styles:{display:"block"},width:g},h.tsx("polygon",{fill:this._fillStyle,points:a.map(([k,l])=>`${k},${l}`).join(" "),stroke:this._strokeBackgroundStyle,"stroke-width":this.strokeWidth}),h.tsx("polygon",{fill:"transparent",points:a.map(([k,l])=>`${k},${l}`).join(" "),stroke:this._strokeStyle,"stroke-dasharray":this.strokeDash.length?this.strokeDash.join(" "):void 0,"stroke-width":this.strokeWidth})))}renderCanvas(){}};d.__decorate([e.property()],b.prototype,
"coordinates",void 0);d.__decorate([e.property()],b.prototype,"strokeDash",void 0);d.__decorate([e.property()],b.prototype,"strokeWidth",void 0);d.__decorate([e.property()],b.prototype,"strokeColor",void 0);d.__decorate([e.property()],b.prototype,"strokeDashColor",void 0);d.__decorate([e.property()],b.prototype,"fillColor",void 0);d.__decorate([e.property()],b.prototype,"visible",void 0);d.__decorate([e.property()],b.prototype,"isDecoration",void 0);d.__decorate([e.property({readOnly:!0})],b.prototype,
"_strokeStyle",null);d.__decorate([e.property({readOnly:!0})],b.prototype,"_strokeBackgroundStyle",null);d.__decorate([e.property({readOnly:!0})],b.prototype,"_fillStyle",null);d.__decorate([e.property({readOnly:!0})],b.prototype,"_renderCoordinates",null);return b=d.__decorate([n.subclass("esri.views.overlay.OutlineOverlayItem")],b)});