UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 3.37 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../../../views/MapView.js";import i from"../../Widget.js";import s from"./ImageViewerViewModel.js";import{globalCss as a}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{vmEvent as n}from"../../support/decorators/vmEvent.js";import{tsx as l}from"../../support/jsxFactory.js";const p="esri-image-viewer";let c=class extends i{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.loadImage=async e=>this.viewModel.loadImage(e),this.removeGraphic=e=>{this.viewModel.removeGraphic(e)},this.removeManyGraphics=e=>{this.viewModel.removeManyGraphics(e)}}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 imageSource(){return this.viewModel.imageSource}set imageSource(e){this.viewModel.imageSource=e}get sharpness(){return this.viewModel.sharpness}set sharpness(e){this.viewModel.sharpness=e}get state(){return this.viewModel.state}render(){return l("div",{afterCreate:this._afterContainerCreate,bind:this,class:this.classes(a.widget,p)})}};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:o})],c.prototype,"imageRenderer",null),e([t()],c.prototype,"imageRotation",null),e([t()],c.prototype,"imageSource",null),e([n(["click","hittest-response","pixel-location"]),t({type:s})],c.prototype,"viewModel",void 0),e([t({type:Number})],c.prototype,"sharpness",null),e([t({readOnly:!0})],c.prototype,"state",null),c=e([r("esri.widgets.OrientedImageryViewer.components.ImageViewer")],c);const d=c;export{d as default};