UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 22.1 kB
import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import i from"../../../../../core/Handles.js";import{makeHandle as a}from"../../../../../core/handleUtils.js";import{rad2deg as s}from"../../../../../core/mathUtils.js";import{isSome as o,unwrapOr as r,isNone as n,unwrap as p}from"../../../../../core/maybe.js";import{createLength as l}from"../../../../../core/quantityUtils.js";import{watch as h,initial as c}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as d}from"../../../../../core/screenUtils.js";import{lengthUnitFromSpatialReference as u,getMetersPerUnitForSR as m}from"../../../../../core/unitUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import{subclass as g}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as y}from"../../../../../chunks/mat4.js";import{s as v,a as f,f as S}from"../../../../../chunks/vec2.js";import{a as M}from"../../../../../chunks/vec2f64.js";import{c as b,z as T,b as E,n as x,l as B,e as O}from"../../../../../chunks/vec3.js";import{c as A,a as R}from"../../../../../chunks/vec3f64.js";import{containsXY as j}from"../../../../../geometry/support/aaBoundingRect.js";import{a as G,c as D}from"../../../../../chunks/boundedPlane.js";import{intersectRay as w,create as P,normal as z}from"../../../../../geometry/support/plane.js";import{create as I}from"../../../../../geometry/support/ray.js";import{sv2d as U,sv3d as Z,sm4d as C}from"../../../../../geometry/support/vectorStacks.js";import{getGraphicEffectiveElevationInfo as k}from"../../../../../support/elevationInfoUtils.js";import{createShiftManipulator as X,OffsetMode as Y,IsShiftEdgeOnScreenFlag as L,createResizeManipulator as N,resizeNormal as V,resizeOutlineOnly as H,isDiagonalResizeHandle as F,calculateDiagonalResizeHandleScale as q,createRotatePlane as W,RotationAxis as J,calculateBoundedPlaneTranslateRotate as K,updateRotateHeadingHandle as Q,updateResizeHandle as $}from"../../../analysis/Slice/sliceToolUtils.js";import{getRotateHeadingTexture as tt}from"../../../analysis/Slice/images/Factory.js";import{Manipulator3D as et}from"../../Manipulator3D.js";import{createRotateManipulator as it,getGraphicAttachmentOrigin as at,calculateInputRotationTransform as st}from"../../manipulatorUtils.js";import{screenToZConstrained as ot,screenToRenderPlane as rt}from"../dragEventPipeline3D.js";import{ManipulatorType as nt}from"../ManipulatorType.js";import{canMoveZ as pt}from"../manipulatorUtils.js";import{createVisualElements as lt}from"../visualElementUtils.js";import{ManipulationType as ht}from"../manipulations/MoveManipulation.js";import{MoveXYGraphicManipulation as ct}from"../manipulations/MoveXYGraphicManipulation.js";import{PreserveAspectRatio as dt}from"./PreserveAspectRatio.js";import{OutlineVisualElement as ut}from"../../visualElements/OutlineVisualElement.js";import{evaluateElevationAlignmentAtPoint as mt}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as _t}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as gt}from"../../../layers/graphics/GraphicState.js";import{fromScreen as yt}from"../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as vt,addMapDelta as ft,addScreenDelta as St}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as Mt}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as bt}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as Tt}from"../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as Et}from"../../../../interactive/editGeometry/operations/UpdateVertices.js";import{mapPlaneAutoHorizontalSizeByElevationMode as xt,calculateOrientedBounds as Bt,mapPlaneToRenderPlane as Ot,apply as At,unapply as Rt}from"../../../../interactive/editGeometry/support/editPlaneUtils.js";import jt from"../../../../interactive/sketch/SketchTooltipOptions.js";import{ExtentRotateTooltipInfo as Gt,ExtentScaleTooltipInfo as Dt}from"../../../../interactive/tooltip/ExtentTooltipInfos.js";import{Tooltip as wt}from"../../../../interactive/tooltip/Tooltip.js";import{TranslateGraphicTooltipInfo as Pt,TranslateGraphicZTooltipInfo as zt}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as It}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as Ut}from"../../../../support/euclideanLengthMeasurementUtils.js";let Zt=class extends(e.EventedMixin(Mt)){constructor(t){super(t),this.enableZ=!0,this.enableRotation=!0,this.enableScaling=!0,this.tooltipOptions=new jt,this._preserveAspectRatio=new dt,this.grabbing=!1,this.inputState=null,this.type="transform-3d",this._handles=new i,this._attachmentOrigin=null,this._outlineVisualElement=null,this._mapBounds=G(),this._mapBoundsStart=G(),this._zmax=0,this._sizeStart=null,this._displayBounds=G(),this._displayBoundsStart=G(),this._displayBoundsMarginStart=0,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._rotateTooltipInfo=null,this._scaleTooltipInfo=null,this._startAngle=0,this._endAngle=0,this._startScale=M(),this._endScale=M()}initialize(){const{view:t,graphic:e,manipulators:i,_handles:s}=this,r=this._graphicState=new gt({graphic:e}),n=e.geometry;this._editGeometryOperations=bt.fromGeometry(n,t.state.viewingMode),this._graphicMoveManipulation=new ct({tool:this,view:t,graphicState:r}),this._moveZManipulator=X(t,Y.CENTER_ON_CALLOUT),this._moveZManipulator.state|=L,s.add([this._createMoveXYGraphicDragPipeline(),h((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._moveZManipulator,nt.TRANSLATE_Z))),this._createMoveZDragPipeline()]),i.add(this._moveZManipulator),this._resizeManipulators=this._resizeHandles.map((e=>{const i=N(t,e);return s.add([h((()=>this.enableScaling),(()=>this._updateManipulatorAvailability(i,nt.SCALE))),i.events.on("grab-changed",(t=>this._onResizeGrab(t))),this._createResizeDragPipeline(i,e)]),i})),i.addMany(this._resizeManipulators),this._rotateManipulatorTexture=tt(t.toolViewManager.textures),this._rotateManipulator=it(t,{texture:this._rotateManipulatorTexture.texture}),s.add([h((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._rotateManipulator,nt.ROTATE))),this._rotateManipulator.events.on("grab-changed",(t=>{this._onRotateGrab(t)})),this._createRotateDragPipeline(this._rotateManipulator)]),i.add(this._rotateManipulator),this._calculateMapBounds(),this._updateDisplayBounds();const p=lt({view:t,graphic:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>a()});o(p)&&(this._outlineVisualElement=p.visualElement instanceof ut?p.visualElement:null),o(this._outlineVisualElement)&&s.add(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>this._updateDisplayBounds()))),s.add(p),s.add([r.on("changed",(()=>this._onGeometryChanged())),h((()=>r.displaying),(()=>this._updateAllManipulatorAvailability())),h((()=>r.isDraped),(()=>this._graphicDrapedChanged()),c),t.trackGraphicState(r)]);const l=t.pointsOfInterest;s.add(h((()=>l?.centerOnSurfaceFrequent.location),(()=>this._updateDisplayBounds())));const d=t=>{s.add(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(d);const u=(t,i)=>{s.add(t.events.on("immediate-click",(t=>{i===nt.TRANSLATE_XY&&this.emit("immediate-click",{...t,graphic:e}),t.stopPropagation()})))};this._forEachManipulator(u),this._onGeometryChanged(),this._updateAllManipulatorAvailability(),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._mapBounds=null,this._displayBounds=null,this._rotateManipulatorTexture.release(),this._handles.destroy(),this._graphicMoveManipulation.destroy(),this._editGeometryOperations.destroy(),this._tooltip.destroy(),this._set("view",null),this._set("graphic",null)}_initializeTooltip(){const{_handles:t,view:e}=this,i=this._tooltip=new wt({view:e}),a=()=>{i.info=this._getUpdatedTooltipInfo()};t.add([this.on("graphic-translate-start",a),this.on("graphic-translate",a),this.on("graphic-translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null,this._tooltip.clear()})),this.on("graphic-rotate-start",(t=>{this._startAngle=t.angle,a()})),this.on("graphic-rotate",(t=>{this._endAngle=t.angle,a()})),this.on("graphic-rotate-stop",(()=>{this._startAngle=0,this._endAngle=0,a()})),this.on("graphic-scale-start",(t=>{v(this._startScale,t.xScale,t.yScale),v(this._endScale,t.xScale,t.yScale),a()})),this.on("graphic-scale",(t=>{v(this._endScale,t.xScale,t.yScale),a()})),this.on("graphic-scale-stop",(()=>{v(this._startScale,0,0),v(this._endScale,0,0),a()}))]),this._forEachManipulator((e=>{t.add([e.events.on("focus-changed",a),e.events.on("grab-changed",a),e.events.on("drag",(t=>{"cancel"===t.action?this._tooltip.clear():a()}))])}))}_getUpdatedTooltipInfo(){return this.tooltipOptions.enabled?this._graphicMoveManipulation.grabbing||this._graphicMoveManipulation.dragging?this._computeMoveXYTooltipInfo():this._moveZManipulator.focused?this._computeMoveZTooltipInfo():this._rotateManipulator.focused?this._computeRotateTooltipInfo():this._resizeManipulators.some((t=>t.focused))?this._computeScaleTooltipInfo():null:null}_computeMoveXYTooltipInfo(){return this._moveXYTooltipInfo=r(this._moveXYTooltipInfo,(()=>new Pt({tooltipOptions:this.tooltipOptions})))}_computeMoveZTooltipInfo(){const t=this._moveZTooltipInfo=r(this._moveZTooltipInfo,(()=>new zt({tooltipOptions:this.tooltipOptions}))),e=this._moveUnit;if(this._moveZManipulator.dragging){const e=this._mapBoundsStart.origin,i=this._mapBounds.origin,a=Ut(e,i,this.view.spatialReference);if(n(a))return null;t.distance=a}else t.distance=l(0,e);return t}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo=r(this._rotateTooltipInfo,(()=>new Gt({tooltipOptions:this.tooltipOptions})));return t.angle=this._startAngle-this._endAngle,t}_computeScaleTooltipInfo(){const t=this.graphic.geometry;if(n(t))return null;const e=this._scaleTooltipInfo=r(this._scaleTooltipInfo,(()=>new Dt({tooltipOptions:this.tooltipOptions}))),i=xt(this._mapBounds,this._zmax,t.spatialReference,this._graphicState.isDraped);return n(i)?null:(e.xSize=i[0],e.ySize=i[1],o(this._sizeStart)&&this._resizeManipulators.some((t=>t.dragging))?(e.xScale=i[0].value/this._sizeStart[0].value,e.yScale=i[1].value/this._sizeStart[1].value):(e.xScale=1,e.yScale=1),e)}_graphicDrapedChanged(){this._handles.remove(Ct),this._updateDisplayBounds(),this._graphicState.isDraped&&this._handles.add(this.view.elevationProvider.on("elevation-change",(t=>{o(this._attachmentOrigin)&&j(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._updateDisplayBounds()})),Ct)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof et){const a=this._graphicState.displaying,s=this.enableZ&&pt(this.graphic);switch(e){case nt.ROTATE:t.available=a&&this.enableRotation;break;case nt.SCALE:t.available=a&&(this.enableScaling||this.enableRotation||s),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?V:H;break;case nt.TRANSLATE_Z:t.available=a&&s;break;default:t.available=a}}}_forEachManipulator(t){this._graphicMoveManipulation.forEachManipulator(t),this._resizeManipulators.forEach((e=>t(e,nt.SCALE))),t(this._rotateManipulator,nt.ROTATE),t(this._moveZManipulator,nt.TRANSLATE_Z)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get _moveUnit(){return r(u(this.view.spatialReference),"meters")}reset(){}_onGeometryChanged(){this._updateDisplayBounds()}_calculateMapBounds(){const t=this.graphic.geometry,e=this._editGeometryOperations.data,i=e.components[0].edges[0],a=f(U.get(),i.leftVertex.pos,i.rightVertex.pos);S(a,a);const s=r(at(this.view,this.graphic),(()=>t.extent?.center));let o=s?Xt*this.view.pixelSizeAt(s):0;const n=this.view.spatialReference,p=t.spatialReference;n.equals(p)||(o*=m(n)/m(p)),Bt(a,e,o,this._mapBounds),this._updateZMax()}_updateZMax(){const t=this._editGeometryOperations.data;if(!t.geometry.hasZ)return void(this._zmax=0);const e=t.coordinateHelper;let i=Number.NEGATIVE_INFINITY;for(const a of t.components)for(const t of a.vertices){const a=e.getZ(t.pos)??0;i=Math.max(a,i)}this._zmax=i}_updateDisplayBounds(){const{geometry:t}=this.graphic;if(n(t))return;const{extent:e}=t;if(!e)return;const i=o(this._outlineVisualElement)&&!this._graphicState.isDraped&&o(this._outlineVisualElement.attachmentOrigin)?this._outlineVisualElement.attachmentOrigin:at(this.view,this.graphic);this._attachmentOrigin=r(i,e.center);const a=o(i)?i.z:mt(this._mapBounds.origin,this.view.elevationProvider,_t.fromElevationInfo(k(this.graphic)),this.view.renderCoordsHelper),s=D(this._mapBounds);s.origin[2]=a??0,Ot(s,this.view.renderCoordsHelper,t.spatialReference,this._displayBoundsMargin,this._displayBounds),this._updateManipulators()}get _displayBoundsMargin(){const t=this.view.pointsOfInterest,e=t?t.centerOnSurfaceFrequent.location:this._editGeometryOperations.data.geometry.extent?.center;return e?kt*this.view.pixelSizeAt(e):0}_createMoveXYGraphicDragPipeline(){return this._graphicMoveManipulation.createDragPipeline(((t,e,i)=>this._applyGraphicMoveSteps(e,i,ht.XY)))}_createMoveZDragPipeline(){const t=this.view,e=this._editGeometryOperations.data.spatialReference;return vt(this._moveZManipulator,((i,a,s)=>{const o=R(i.renderLocation),r=a.next(ot(t,o,e)).next(St());this._applyGraphicMoveSteps(r,s,ht.Z)}))}_applyGraphicMoveSteps(t,e,i){const a=t.next((t=>("start"===t.action&&(this.inputState={type:"move"},this._updateOperationStartProperties(),this.emit("graphic-translate-start",{graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(ft()).next(this._moveDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||(t.mapEnd.z??0)-(t.mapStart.z??0))&&this.emit("graphic-translate",e);break;case"end":this.inputState=null,this.emit("graphic-translate-stop",e)}return t})).next((t=>this._updateMoveTooltip(t,i)));return e.next((()=>{o(this.inputState)&&this.emit("graphic-translate-stop",{graphic:this.graphic,dxScreen:0,dyScreen:0}),this._cancel()})),a}_updateOperationStartProperties(){D(this._displayBounds,this._displayBoundsStart),D(this._mapBounds,this._mapBoundsStart),n(this.graphic.geometry)?this._sizeStart=null:this._sizeStart=xt(this._mapBoundsStart,this._zmax,this.graphic.geometry.spatialReference,this._graphicState.isDraped)}_moveDragUpdateGeometry(){return t=>{if(n(this.inputState)||"move"!==this.inputState.type)return t;const e=[];for(const s of this._editGeometryOperations.data.components)e.push(...s.vertices);const i="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,a=this._editGeometryOperations.moveVertices(e,t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);return At(a,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_updateMoveTooltip(t,e){if(e===ht.XY||e===ht.XY_AXIS){const e=It(t.mapStart,t.mapEnd,this._graphicState.isDraped?"on-the-ground":"absolute-height");o(e)&&o(this._moveXYTooltipInfo)&&(this._moveXYTooltipInfo.distance=e)}return t}_onResizeGrab({action:t,screenPoint:e}){if("start"!==t||!e)return;const i=this._calculatePickRay(e);w(this._displayBounds.plane,i,Z.get())&&(this._updateOperationStartProperties(),this._displayBoundsMarginStart=this._displayBoundsMargin,this.inputState={type:"resize"})}_createResizeDragPipeline(t,e){return vt(t,((t,i,a)=>{n(this.inputState)||(i.next((t=>("start"===t.action&&this.emit("graphic-scale-start",{graphic:this.graphic,xScale:1,yScale:1}),t))).next(rt(this.view,this._displayBoundsStart.plane)).next((t=>({...t,handle:e}))).next(this._resizeDragRenderPlaneToFactors()).next(...this._preserveAspectRatio.createDragEventPipelineStep()).next(this._resizeDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":this.emit("graphic-scale",e);break;case"end":this.inputState=null,this.emit("graphic-scale-stop",e)}return t})),a.next((()=>{o(this.inputState)&&this.emit("graphic-scale-stop",{graphic:this.graphic,xScale:1,yScale:1}),this._cancel()})))}))}_resizeDragRenderPlaneToFactors(){return t=>{const e=this._displayBoundsStart,i=t.handle.direction,a=this._displayBoundsMargin,s=this._displayBoundsMarginStart,o=b(Z.get(),e.origin);T(o,o,e.basis1,-i[0]),T(o,o,e.basis2,-i[1]);const r=E(Z.get(),t.renderEnd,o),n=E(Z.get(),t.renderStart,o),p=F(t.handle),l=q(e),h=q(this._displayBounds)/l,c=(t,e)=>{if(0===t)return 1;let i=B(e),o=.5*t*O(e,r)/i;const l=o<0?-1:1;if(p){o+=(i-.5*t*O(e,n)/i)*l*h}const c=i<1.5*s?1:Yt;return i=Math.max(i-s,Yt),l>0&&(o-=a),l*Math.max(l*(o/i),c)};return{...t,factor1:c(i[0],e.basis1),factor2:c(i[1],e.basis2)}}}_resizeDragUpdateGeometry(){return t=>{const e=b(A(),this._mapBoundsStart.origin);T(e,e,this._mapBoundsStart.basis1,-t.handle.direction[0]),T(e,e,this._mapBoundsStart.basis2,-t.handle.direction[1]);const i=v(M(),this._mapBoundsStart.basis1[0],this._mapBoundsStart.basis1[1]);S(i,i);const a=[];for(const r of this._editGeometryOperations.data.components)a.push(...r.vertices);const s="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,o=this._editGeometryOperations.scaleVertices(a,e,i,t.factor1,t.factor2,s,Et.REPLACE);return D(this._mapBoundsStart,this._mapBounds),At(o,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_onRotateGrab({action:t,screenPoint:e}){if("start"!==t||!e)return;const i=W(this._displayBounds,this.view.renderCoordsHelper,J.HEADING,P()),a=this._calculatePickRay(e);w(i,a,Z.get())&&(this._updateOperationStartProperties(),this.inputState={type:"rotate",rotatePlane:i})}_createRotateDragPipeline(t){return vt(t,((t,e,i)=>{const a=this.inputState;n(a)||(e.next((t=>("start"===t.action&&this.emit("graphic-rotate-start",{graphic:this.graphic,angle:0}),t))).next(rt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdateGeometry()).next((t=>{const e={graphic:this.graphic,angle:s(t.rotateAngle)};switch(t.action){case"start":case"update":this.emit("graphic-rotate",e);break;case"end":this.inputState=null,this.emit("graphic-rotate-stop",e)}return t})),i.next((()=>{o(this.inputState)&&this.emit("graphic-rotate-stop",{graphic:this.graphic,angle:0}),this._cancel()})))}))}_rotateDragRenderPlaneToRotate(t){return e=>{const i=z(t.rotatePlane),a=st(e.renderStart,e.renderEnd,this._displayBounds.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdateGeometry(){return t=>{const e=b(A(),this._mapBoundsStart.origin),i=[];for(const o of this._editGeometryOperations.data.components)i.push(...o.vertices);const a="start"===t.action?Tt.NEW_STEP:Tt.ACCUMULATE_STEPS,s=this._editGeometryOperations.rotateVertices(i,e,t.rotateAngle,a,Et.REPLACE);return D(this._mapBoundsStart,this._mapBounds),At(s,this._mapBounds),this.graphic.geometry=this._editGeometryOperations.data.geometry,t}}_calculatePickRay(t){const e=I(),i=d(t);return yt(this.view.state.camera,i,e),x(e.direction,e.direction),e}_updateManipulators(){if(!this.visible)return;const t=K(this._displayBounds,C.get());Q(this._rotateManipulator,t,this._displayBounds,this.view.renderCoordsHelper),this._updateZMoveHandle(this._moveZManipulator,t),this._resizeManipulators.forEach(((e,i)=>{$(e,this._resizeHandles[i],t,this._displayBounds)}))}_updateZMoveHandle(t,e){const i=this._displayBounds,a={basis:i.basis1,direction:-1,position:E(Z.get(),i.origin,i.basis1),edge:2},s=C.get();y(s,e,a.edge*Math.PI/2),s[12]=0,s[13]=0,s[14]=0,t.modelTransform=s,t.renderLocation=a.position}_cancel(){const t=this._editGeometryOperations.lastOperation;n(t)||(this._editGeometryOperations.undo(),this.graphic.geometry=this._editGeometryOperations.data.geometry,Rt(t,this._mapBounds),this._updateDisplayBounds(),this.inputState=null)}get canUndo(){return this._editGeometryOperations.canUndo}undo(){if(o(this.inputState))this.view.activeTool=null;else if(this.canUndo){const t=this._editGeometryOperations.undo();this.graphic.geometry=this._editGeometryOperations.data.geometry,Rt(p(t),this._mapBounds),this._updateDisplayBounds()}}get canRedo(){return this._editGeometryOperations.canRedo}redo(){if(this.canRedo){const t=this._editGeometryOperations.redo();this.graphic.geometry=this._editGeometryOperations.data.geometry,At(p(t),this._mapBounds),this._updateDisplayBounds()}}get test(){return{resizeManipulators:this._resizeManipulators,rotateManipulator:this._rotateManipulator,moveZManipulator:this._moveZManipulator,tooltip:this._tooltip}}};t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"view",void 0),t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"graphic",void 0),t([_({constructOnly:!0,nonNullable:!0})],Zt.prototype,"enableZ",void 0),t([_()],Zt.prototype,"enableRotation",void 0),t([_()],Zt.prototype,"enableScaling",void 0),t([_({constructOnly:!0,type:jt})],Zt.prototype,"tooltipOptions",void 0),t([_()],Zt.prototype,"preserveAspectRatio",null),t([_()],Zt.prototype,"grabbing",void 0),t([_()],Zt.prototype,"inputState",void 0),t([_({readOnly:!0})],Zt.prototype,"type",void 0),t([_()],Zt.prototype,"_moveUnit",null),Zt=t([g("esri.views.3d.interactive.editingTools.graphicTransform3D.ExtentTransformTool")],Zt);const Ct="draped-elevation-changes",kt=10,Xt=80,Yt=1e-6;export{Yt as EPSILON,Zt as ExtentTransformTool};