@doegis/core
Version:
DOE GIS API
3 lines (1 loc) • 1.79 kB
JavaScript
import{isSome as t}from"../../../../core/maybe.js";import{ApplyRendererDiffResult as s}from"./interfaces.js";import{Loadable as r}from"./Loadable.js";import{emptySymbolComplexity as i}from"./symbolComplexity.js";class e extends r{constructor(t,s,r){super(s),this.symbol=t,this._convert=r,this.symbologySnappingSupported=!1,this.graphics3DSymbol=null,this.referenced=0}getSymbolLayerSize(s){return t(this.graphics3DSymbol)?this.graphics3DSymbol.getSymbolLayerSize(s):null}get symbolLayers(){return t(this.graphics3DSymbol)?this.graphics3DSymbol.symbolLayers:[]}get extentPadding(){return t(this.graphics3DSymbol)?this.graphics3DSymbol.extentPadding:0}async doLoad(s){const r=await this.symbol.fetchSymbol({signal:s});r.id=this.symbol.id,this.graphics3DSymbol=this._convert(r),t(this.graphics3DSymbol)&&await this.graphics3DSymbol.load()}createGraphics3DGraphic(s){return t(this.graphics3DSymbol)?this.graphics3DSymbol.createGraphics3DGraphic(s,this):null}get complexity(){return t(this.graphics3DSymbol)?this.graphics3DSymbol.complexity:i}globalPropertyChanged(s,r){return!!t(this.graphics3DSymbol)&&this.graphics3DSymbol.globalPropertyChanged(s,r)}applyRendererDiff(r,i){return t(this.graphics3DSymbol)?this.graphics3DSymbol.applyRendererDiff(r,i):s.Recreate_Symbol}prepareSymbolPatch(s){t(this.graphics3DSymbol)&&this.graphics3DSymbol.prepareSymbolPatch(s)}updateGeometry(s,r){return!!t(this.graphics3DSymbol)&&this.graphics3DSymbol.updateGeometry(s,r)}onRemoveGraphic(){}getFastUpdateStatus(){return t(this.graphics3DSymbol)?this.graphics3DSymbol.getFastUpdateStatus():{loading:1,fast:0,slow:0}}destroy(){t(this.graphics3DSymbol)&&this.graphics3DSymbol.destroy(),this.graphics3DSymbol=void 0,super.destroy()}get destroyed(){return void 0===this.graphics3DSymbol}}export{e as default};