UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 3.02 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{__decorate as e}from"tslib";import t from"../Camera.js";import{property as i,subclass as o}from"../core/accessorSupport/decorators.js";import r from"./Widget.js";import a from"./PanoramicViewer/PanoramicViewerViewModel.js";import{loadCalciteComponents as s}from"./support/componentsUtils.js";import{globalCss as l}from"./support/globalCss.js";import{tsx as n,vmEvent as p}from"./support/widget.js";const d="esri-panoramic-viewer";let c=class extends r{constructor(e){super(e),this.viewModel=new a,this._afterContainerCreate=e=>{this.imageRenderer.container=e},this.addGraphic=(e,t)=>{this.viewModel.addGraphic(e,t)},this.addManyGraphics=e=>{this.viewModel.addManyGraphics(e)},this.clearGraphics=()=>{this.viewModel.clearGraphics()},this.clearImage=()=>{this.viewModel.clearImage()},this.loadMedia=(e,t)=>this.viewModel.loadMedia(e,t),this.removeGraphic=e=>{this.viewModel.removeGraphic(e)},this.removeManyGraphics=e=>{this.viewModel.removeManyGraphics(e)}}loadDependencies(){return s({panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")})}get autoLoad(){return this.viewModel.autoLoad}set autoLoad(e){this.viewModel.autoLoad=e}get camera(){return this.viewModel.camera}set camera(e){e&&(this.viewModel.camera=e)}get clickAction(){return this.viewModel.clickAction}set clickAction(e){this.viewModel.clickAction=e}get fov(){return this.camera?.fov}set fov(e){this.viewModel.fov=e}get hfov(){return this.viewModel.hfov}get icon(){return"i360-view"}set icon(e){this._overrideIfSome("icon",e)}get imageRenderer(){return this.viewModel.imageRenderer}get imageSize(){return this.viewModel.imageSize}get media(){return this.viewModel.media}set media(e){this.viewModel.media=e}get pitch(){return this.viewModel.pitch}set pitch(e){this.viewModel.pitch=e}get state(){return this.viewModel.state}get ui(){return this.imageRenderer.ui}get vfov(){return this.viewModel.vfov}get yaw(){return this.viewModel.yaw}set yaw(e){this.viewModel.yaw=e}render(){return n("calcite-panel",{afterCreate:this._afterContainerCreate,bind:this,class:this.classes(l.widget,d),loading:this.viewModel.updating})}static{this.vnodeSelector="calcite-panel"}};e([i({type:Boolean})],c.prototype,"autoLoad",null),e([i({type:t})],c.prototype,"camera",null),e([i()],c.prototype,"clickAction",null),e([i({type:Number})],c.prototype,"fov",null),e([i({readOnly:!0,type:Number})],c.prototype,"hfov",null),e([i()],c.prototype,"icon",null),e([i({readOnly:!0})],c.prototype,"imageRenderer",null),e([i({readOnly:!0})],c.prototype,"imageSize",null),e([i()],c.prototype,"media",null),e([i({type:Number})],c.prototype,"pitch",null),e([i({readOnly:!0})],c.prototype,"state",null),e([i()],c.prototype,"ui",null),e([i({readOnly:!0,type:Number})],c.prototype,"vfov",null),e([p(["click","hittest-response","pixel-location"]),i({type:a})],c.prototype,"viewModel",void 0),e([i({type:Number})],c.prototype,"yaw",null),c=e([o("esri.widgets.PanoramicViewer")],c);const h=c;export{h as default};