You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
3.9 KiB
11 lines
3.9 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define(["exports","../../../core/libs/gl-matrix-2/factories/mat3f32","../../../layers/effects/EffectView","./DisplayObject","../layers/support/util"],function(d,e,f,g,h){class k extends g.DisplayObject{constructor(){super(...arguments);this._childrenSet=new Set;this._needsSort=!1;this._children=[];this._highlightGradient=this._highlightOptions=this._effectView=null}get blendMode(){return this._blendMode}set blendMode(a){this._blendMode=a;this.requestRender()}get children(){return this._children}get clips(){return this._clips}set clips(a){this._clips= |
|
a;this.children.forEach(b=>b.clips=a)}get computedEffects(){return this._effectView?.effects??null}get effect(){return this._effectView?.effect??""}set effect(a){if(this._effectView||a)this._effectView||(this._effectView=new f.EffectView),this._effectView.effect=a,this.requestRender()}get highlightOptions(){return this._highlightOptions}set highlightOptions(a){a?this._highlightOptions?.equals(a)||(this._highlightOptions=a,this._highlightGradient=h.createOrReuseHighlightGradient(this._highlightGradient, |
|
a),this.requestRender()):(this._highlightOptions=null,this._highlightGradient&&(this._highlightGradient.destroy(),this._highlightGradient=null,this.requestRender()))}get hasBlending(){return!!this.blendMode}get hasHighlight(){return this.children.some(a=>a.hasHighlight)}get hasLabels(){return this.children.some(a=>a.hasLabels)}get requiresDedicatedFBO(){return this.children.some(a=>"blendMode"in a&&a.blendMode&&"normal"!==a.blendMode)}updateTransitionProperties(a,b){super.updateTransitionProperties(a, |
|
b);this._effectView&&(this._effectView.transitionStep(a,b),this._effectView.transitioning&&this.requestRender())}doRender(a){a=this.createRenderParams(a);const {painter:b}=a;b.beforeRenderLayer(a,this._clips?.length?255:0,this.computedOpacity);this.renderChildren(a);b.afterRenderLayer(a,this.computedOpacity)}addChild(a){return this.addChildAt(a,this.children.length)}addChildAt(a,b=this.children.length){if(!a||this.contains(a))return a;this._needsSort=!0;const c=a.parent;c&&c!==this&&c.removeChild(a); |
|
b>=this.children.length?this.children.push(a):this.children.splice(b,0,a);this._childrenSet.add(a);a.parent=this;a.stage=this.stage;this!==this.stage&&(a.clips=this.clips);this.requestRender();return a}contains(a){return this._childrenSet.has(a)}endTransitions(){super.endTransitions();this._effectView&&(this._effectView.endTransitions(),this.requestRender())}removeAllChildren(){this._childrenSet.clear();this._needsSort=!0;for(const a of this.children)this!==this.stage&&(a.clips=null),a.stage=null, |
|
a.parent=null;this.children.length=0}removeChild(a){return this.contains(a)?this.removeChildAt(this.children.indexOf(a)):a}removeChildAt(a){if(0>a||a>=this.children.length)return null;this._needsSort=!0;a=this.children.splice(a,1)[0];this._childrenSet.delete(a);this!==this.stage&&(a.clips=null);a.stage=null;a.parent=null;return a}sortChildren(a){this._needsSort&&(this.children.sort(a),this._needsSort=!1)}beforeRender(a){super.beforeRender(a);for(const b of this.children)b.beforeRender(a)}afterRender(a){super.afterRender(a); |
|
for(const b of this.children)b.afterRender(a)}_createTransforms(){return{displayViewScreenMat3:e.create()}}onAttach(){super.onAttach();const a=this.stage;for(const b of this.children)b.stage=a}onDetach(){super.onDetach();for(const a of this.children)a.stage=null}renderChildren(a){for(const b of this.children)b.processRender(a)}createRenderParams(a){return{...a,requireFBO:this.requiresDedicatedFBO,blendMode:this.blendMode,effects:this.computedEffects,globalOpacity:a.globalOpacity*this.computedOpacity, |
|
inFadeTransition:this.inFadeTransition,highlightGradient:this._highlightGradient||a.highlightGradient}}}d.Container=k;Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}); |