UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.42 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as o}from"../../../chunks/tslib.es6.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{whenOnce as t}from"../../../core/reactiveUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{supportsHeightModelInfo as p,rejectLayerError as a}from"../../../geometry/support/heightModelInfoUtils.js";const l=l=>{let n=class extends l{constructor(){super(...arguments),this.slicePlaneEnabled=!1,this.supportsHeightUnitConversion=!1}postscript(){super.postscript(),p(this.layer)&&this.addResolvingPromise(this._validateHeightModelInfo())}async _validateHeightModelInfo(){const o=new AbortController,r=o.signal;this.addHandles(s((()=>o.abort()))),await t((()=>this.view.defaultsFromMap?.heightModelInfoReady),r),e(r);const i=a(this.layer,this.view.heightModelInfo,this.supportsHeightUnitConversion);if(i)throw i}};return o([r()],n.prototype,"view",void 0),o([r()],n.prototype,"slicePlaneEnabled",void 0),n=o([i("esri.views.3d.layers.LayerView3D")],n),n};export{l as LayerView3D};