@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.67 kB
JavaScript
/*
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 e from"../../../core/Accessor.js";import{createTask as r}from"../../../core/asyncUtils.js";import t from"../../../core/Collection.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{watch as i,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{updateDirectionalNodesGeneric as a}from"./imageNavigationUtils.js";let m=class extends e{constructor(o){super(o),this._compileTask=null,this.currentNode=null,this.nodes=new t}initialize(){this.addHandles(i((()=>({nodes:this.nodes,currenNode:this.currentNode,length:this.nodes.length,currentHeading:this.currentNode?.currentHeading,currentPitch:this.currentNode?.currentPitch})),(()=>{this._compileTask?.abort(),this._compileTask=r((async o=>{s(o),this.compile()}))}),c))}get state(){const o=this._compileTask;return o?o.finished?o.error?"error":"compiled":"compiling":"ready"}compile(){const{currentNode:o,nodes:e}=this;o&&e.length&&(o.reset(),a(o,e))}};o([n()],m.prototype,"_compileTask",void 0),o([n()],m.prototype,"currentNode",void 0),o([n()],m.prototype,"nodes",void 0),o([n()],m.prototype,"state",null),m=o([p("esri.widgets.OrientedImageryViewer.components.NavigationUIPanoramicViewModel")],m);const d=m;export{d as default};