@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.46 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 e}from"../../../chunks/tslib.es6.js";import{watch as t,syncAndInitial as o}from"../../../core/reactiveUtils.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 d}from"../../../core/accessorSupport/decorators/subclass.js";const a={sketchHandles:"sketch-handles"},r=r=>{let n=class extends r{initialize(){this.addHandles(t((()=>this.viewModel?.sketch),(e=>{this.removeHandles(a.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)}),o)],a.sketchHandles)}),o))}handleCreate(e){}handleUpdate(e){}handleUndo(e){}handleRedo(e){}handleDelete(e){}handleDestroy(){}handleDuplicate(e){}};return e([s()],n.prototype,"type",void 0),e([s()],n.prototype,"viewModel",void 0),n=e([d("esri.widgets.OrientedImageryViewer.mixins.SketchHandlerMixin")],n),n};export{r as SketchHandlerMixin};