UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 494 B
import{isNone as e,isSome as o}from"../../../../core/maybe.js";import{getGraphicEffectiveElevationInfo as r}from"../../../../support/elevationInfoUtils.js";function t(o,t=r(o)){return"on-the-ground"!==t.mode&&!(e(o.geometry)||!o.geometry.hasZ)}function n(e,r){let t=null;const n=e.events.on("grab-changed",(n=>{o(t)&&(t.remove(),t=null),"start"===n.action?(t=e.disableDisplay(),r&&r(n)):r&&r(n)}));return{remove(){o(t)&&t.remove(),n.remove()}}}export{t as canMoveZ,n as disableDisplayOnGrab};