@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 955 B
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{AFlowResources as s}from"./AFlowResources.js";class t{constructor(s){this._styles=s,this.supportsContinuation=!1,this.slideoutDuration=0}get animated(){return this._styles.reduce((s,t)=>s||t.animated,!1)}isCompatible(s){if(!(s instanceof t))return!1;if(this._styles.length!==s._styles.length)return!1;const e=this._styles.length;for(let t=0;t<e;t++)if(!this._styles[t].isCompatible(s._styles[t]))return!1;return!0}async load(s,t,r){const o=await Promise.all(this._styles.map(t=>t.load(s,null,r)));return new e(o,s,[])}render(s,t,e){for(let r=0;r<this._styles.length;r++)this._styles[r].render(s,t,e.resources[r])}}class e extends s{constructor(s,t,e){super(t,e),this.resources=s}attach(s){for(const t of this.resources)t.attach(s)}detach(){for(const s of this.resources)s.detach()}get ready(){return this.resources.reduce((s,t)=>s&&t.ready,!0)}}export{t as Stack,e as StackResources};