@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.71 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{_ as o}from"../../chunks/tslib.es6.js";import t from"../../Color.js";import r from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import"../../widgets/support/widgetUtils.js";import{tsx as i}from"../../widgets/support/jsxFactory.js";let p=class extends r{constructor(o){super(o),this.color=new t([255,127,0,1]),this.isDecoration=!0,this.length=34,this.rotation=0,this.thickness=2,this.visible=!0}get _strokeStyle(){return this.color.toCss(!0)}render(){const{x:o,y:t,length:r,thickness:s,rotation:e}=this,p=r/2,l=`0 0 ${r} ${r}`,c=`M${p} 0 V${r} M0 ${p} H${r}`;return i("div",{classes:{"esri-box-overlay-item":!0},dir:"ltr",styles:{left:`${(o??0)-p}px`,top:`${(t??0)-p}px`,width:`${r}px`,height:`${r}px`,transform:`rotate(${e}deg)`,visibility:this.visible?"visible":"hidden"}},i("svg",{styles:{overflow:"visible"},viewbox:l},i("path",{d:c,stroke:this._strokeStyle,"stroke-width":s})))}renderCanvas(){}};o([s()],p.prototype,"color",void 0),o([s()],p.prototype,"isDecoration",void 0),o([s()],p.prototype,"length",void 0),o([s()],p.prototype,"rotation",void 0),o([s()],p.prototype,"thickness",void 0),o([s()],p.prototype,"visible",void 0),o([s()],p.prototype,"x",void 0),o([s()],p.prototype,"y",void 0),o([s({readOnly:!0})],p.prototype,"_strokeStyle",null),p=o([e("esri.views.overlay.CrosshairOverlayItem")],p);const l=p;export{l as default};