UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 3.32 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{__decorate as e}from"tslib";import{property as t,subclass as i}from"../../../core/accessorSupport/decorators.js";import r from"../../../views/MapView.js";import o from"../../Widget.js";import s from"./ImageViewerViewModel.js";import{loadCalciteComponents as a}from"../../support/componentsUtils.js";import{globalCss as n}from"../../support/globalCss.js";import{tsx as l,vmEvent as p}from"../../support/widget.js";const d="esri-image-viewer";let c=class extends o{constructor(){super(...arguments),this.viewModel=new s,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=async(e,t)=>this.viewModel.loadMedia(e,t),this.removeGraphic=e=>{this.viewModel.removeGraphic(e)},this.removeManyGraphics=e=>{this.viewModel.removeManyGraphics(e)}}loadDependencies(){return a({panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")})}get autoLoad(){return this.viewModel.autoLoad}set autoLoad(e){this.viewModel.autoLoad=e}get brightness(){return this.viewModel.brightness}set brightness(e){this.viewModel.brightness=e}get clickAction(){return this.viewModel.clickAction}set clickAction(e){this.viewModel.clickAction=e}get contrast(){return this.viewModel.contrast}set contrast(e){this.viewModel.contrast=e}get customParameters(){return this.viewModel.customParameters}set customParameters(e){this.viewModel.customParameters=e}get error(){return this.viewModel.error}get imageSize(){const e=this.viewModel.image?.serviceRasterInfo;return e?[e.width,e.height]:[0,0]}get imagePointsInView(){return this.viewModel.imagePointsInView}get imageRenderer(){return this.viewModel.imageRenderer}get imageRotation(){return this.viewModel.imageRotation}set imageRotation(e){this.viewModel.imageRotation=e}get media(){return this.viewModel.media}set media(e){this.viewModel.media=e}get sharpness(){return this.viewModel.sharpness}set sharpness(e){this.viewModel.sharpness=e}get state(){return this.viewModel.state}get ui(){return this.imageRenderer.ui}render(){return l("calcite-panel",{afterCreate:this._afterContainerCreate,bind:this,class:this.classes(n.widget,d),loading:this.viewModel.updating})}static{this.vnodeSelector="calcite-panel"}};e([t({type:Boolean})],c.prototype,"autoLoad",null),e([t({type:Number}),t()],c.prototype,"brightness",null),e([t()],c.prototype,"clickAction",null),e([t({type:Number})],c.prototype,"contrast",null),e([t({type:Object})],c.prototype,"customParameters",null),e([t({readOnly:!0})],c.prototype,"error",null),e([t()],c.prototype,"imageSize",null),e([t({readOnly:!0})],c.prototype,"imagePointsInView",null),e([t({readOnly:!0,type:r})],c.prototype,"imageRenderer",null),e([t()],c.prototype,"imageRotation",null),e([t()],c.prototype,"media",null),e([t({type:Number})],c.prototype,"sharpness",null),e([t({readOnly:!0})],c.prototype,"state",null),e([t()],c.prototype,"ui",null),e([p(["click","hittest-response","pixel-location"]),t({type:s})],c.prototype,"viewModel",void 0),c=e([i("esri.widgets.OrientedImageryViewer.components.ImageViewer")],c);const h=c;export{h as default};