@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 t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapContainer as a}from"../engine/BitmapContainer.js";import{LayerView2DMixin as o}from"./LayerView2D.js";import p from"./support/ExportStrategy.js";import n from"../../layers/LayerView.js";import h from"../../layers/RefreshableLayerView.js";let m=class extends(h(o(n))){update(t){this._strategy.update(t).catch((t=>{r(t)||e.getLogger(this).error(t)})),this.notifyChange("updating")}attach(){this._bitmapContainer=new a,this.container.addChild(this._bitmapContainer),this._strategy=new p({container:this._bitmapContainer,fetchSource:this.fetchBitmapData.bind(this),requestUpdate:this.requestUpdate.bind(this)})}detach(){this._strategy.destroy(),this._strategy=null,this.container.removeChild(this._bitmapContainer),this._bitmapContainer.removeAllChildren()}viewChange(){}moveEnd(){this.requestUpdate()}fetchBitmapData(t,e,r){return this.layer.fetchImageBitmap(t,e,r)}async doRefresh(){this.requestUpdate()}isUpdating(){return this._strategy.updating||this.updateRequested}};t([s()],m.prototype,"_strategy",void 0),t([s()],m.prototype,"updating",void 0),m=t([i("esri.views.2d.layers.BaseDynamicLayerView2D")],m);const d=m;export{d as default};