@doegis/core
Version:
DOE GIS API
3 lines (1 loc) • 1.58 kB
JavaScript
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/accessorSupport/ensureType.js";import"../../../core/arrayUtils.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 m from"../../layers/RefreshableLayerView.js";let h=class extends(m(o(n))){update(t){this._strategy.update(t).catch((t=>{r(t)||e.getLogger(this.declaredClass).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()}moveStart(){}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()],h.prototype,"_strategy",void 0),t([s()],h.prototype,"updating",void 0),h=t([i("esri.views.2d.layers.BaseDynamicLayerView2D")],h);const c=h;export{c as default};