UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 1.67 kB
import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{throwIfAborted as t}from"../../../core/promiseUtils.js";import{whenOnce as r}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{supportsHeightModelInfo as a,rejectLayerError as l}from"../../../geometry/support/heightModelInfoUtils.js";const n=n=>{let c=class extends n{constructor(){super(...arguments),this.slicePlaneEnabled=!1,this.supportsHeightUnitConversion=!1}postscript(e){super.postscript(e),a(this.layer)&&this.addResolvingPromise(this._validateHeightModelInfo())}async _validateHeightModelInfo(){const e=new AbortController,o=e.signal;this.handles.add(s((()=>e.abort()))),await r((()=>this.view.defaultsFromMap?.heightModelInfoReady),o),t(o);const i=l(this.layer,this.view.heightModelInfo,this.supportsHeightUnitConversion);if(i)throw i}canResume(){const e=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return super.canResume()&&(!e||!e.minScale||!e.maxScale||e.minScale>=e.maxScale)}getSuspendInfo(){const e=super.getSuspendInfo(),s=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return s&&s.minScale&&s.maxScale&&s.minScale<s.maxScale&&(e.outsideScaleRange=!0),e}};return e([o()],c.prototype,"view",void 0),e([o()],c.prototype,"slicePlaneEnabled",void 0),c=e([i("esri.views.3d.layers.LayerView3D")],c),c};export{n as LayerView3D};