@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.29 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.19/LICENSE.txt */
import{__decorate as e}from"tslib";import{watch as t,syncAndInitial as d}from"../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../core/accessorSupport/decorators.js";const s={sketchHandles:"sketch-handles"},a=a=>{const i=a;let r=class extends i{initialize(){this.addHandles(t(()=>this.sketch,e=>{this.removeHandles(s.sketchHandles),e&&this.addHandles([e.on("create",e=>this.handleCreate(e)),e.on("update",e=>this.handleUpdate(e)),e.on("undo",e=>this.handleUndo(e)),e.on("redo",e=>this.handleRedo(e)),e.on("delete",e=>this.handleDelete(e)),e.on("destroy",()=>this.handleDestroy()),e.on("duplicate",e=>this.handleDuplicate(e)),t(()=>e.activeComponent,e=>{"draw-2d"!==e?.type&&"draw-3d"!==e?.type||(e.elevationLockOnVertexAddDisabled=!0)},d)],s.sketchHandles)},d))}get sketch(){return this.viewModel?.sketch}handleCreate(e){}handleUpdate(e){}handleUndo(e){}handleRedo(e){}handleDelete(e){}handleDestroy(){}handleDuplicate(e){}};return e([o()],r.prototype,"measurementService",void 0),e([o()],r.prototype,"sketch",null),e([o()],r.prototype,"type",void 0),e([o()],r.prototype,"viewModel",void 0),r=e([n("esri.widgets.OrientedImageryViewer.mixins.SketchHandlerMixin")],r),r};export{a as SketchHandlerMixin};