@doegis/core
Version:
DOE GIS API
3 lines (1 loc) • 1.46 kB
JavaScript
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as s}from"../../../../core/maybe.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{ExtentSet as n}from"../graphics/ExtentSet.js";import{TaskPriority as i}from"../../../support/Scheduler.js";let d=class extends t{constructor(e,t,s){super({}),this._updateExtent=t,this._updateNode=s,this.running=!1,this._extentSet=new n,this._nodeSet=new Set,this.addHandles(e.registerTask(i.ELEVATION_ALIGNMENT,this))}normalizeCtorArgs(){return{}}addExtent(e){this._extentSet.add(e),this.running=!0}schedule(e){this._nodeSet.add(e),this.running=!0}remove(e){this._nodeSet.delete(e),this._updateRunning()}runTask(e){const t=this._extentSet;for(e.run((()=>t.merge(e)));!t.empty&&!e.done;){const r=this._updateExtent(t.pop());s(r)&&r.forAll((e=>this.schedule(e))),e.madeProgress()}if(e.done)return;const r=this._nodeSet;for(const s of r)if(r.delete(s),this._updateNode(s),e.madeProgress(),e.done)break;this._updateRunning()}_updateRunning(){this.running=this._nodeSet.size>0||this._extentSet.size>0}};e([r()],d.prototype,"running",void 0),d=e([o("esri.views.3d.layers.i3s.I3SAsyncElevationUpdater.ts")],d);export{d as I3SAsyncElevationUpdater};