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.
10 lines
3.5 KiB
10 lines
3.5 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/Evented","../../../core/has","../../../core/promiseUtils"],function(d,h,e,f){class k extends h{constructor(){super(...arguments);this._clips=this._fadeInResolver=this._fadeOutResolver=null;this.computedVisible=!0;this.computedOpacity=1;this._isReady=this.inFadeTransition=this.fadeTransitionEnabled=!1;this._opacity=1;this._stage=this.parent=null;this._visible=!0}get clips(){return this._clips}set clips(a){this._clips=a;this.requestRender()}get isReady(){return this._isReady}get opacity(){return this._opacity}set opacity(a){this._opacity!== |
|
a&&(this._opacity=Math.min(1,Math.max(a,0)),this.requestRender())}get stage(){return this._stage}set stage(a){if(this._stage!==a){var b=this._stage;(this._stage=a)?this._stage?.untrashDisplayObject(this)||(this.onAttach(),this.emit("attach")):b?.trashDisplayObject(this)}}get transforms(){return this._getTransforms()}_getTransforms(){null==this._transforms&&(this._transforms=this._createTransforms());return this._transforms}get visible(){return this._visible}set visible(a){this._visible!==a&&(this._visible= |
|
a,this.requestRender())}get hasLabels(){return!1}get hasHighlight(){return!1}get hasBlending(){return!1}fadeIn(){if(this._fadeInResolver)return this._fadeInResolver.promise;this._fadeOutResolver&&(this._fadeOutResolver(),this._fadeOutResolver=null);this.opacity=1;this.computedOpacity=0;this.fadeTransitionEnabled=!0;this._fadeInResolver=f.createResolver();this.requestRender();return this._fadeInResolver.promise}fadeOut(){if(this._fadeOutResolver)return this._fadeOutResolver.promise;this.opacity=0; |
|
this._fadeInResolver&&(this._fadeInResolver(),this._fadeInResolver=null);this.fadeTransitionEnabled=!0;this._fadeOutResolver=f.createResolver();this.requestRender();return this._fadeOutResolver.promise}endTransitions(){this._fadeInResolver?.();this._fadeInResolver=null;this._fadeOutResolver?.();this._fadeOutResolver=null;this.computedOpacity=this.visible?this.opacity:0;this.requestRender()}beforeRender(a){this.updateTransitionProperties(a.deltaTime,a.state.scale);this.setTransform(a.state)}afterRender(a){this._fadeInResolver&& |
|
this.computedOpacity===this.opacity?(this._fadeInResolver(),this._fadeInResolver=null):this._fadeOutResolver&&0===this.computedOpacity&&(this._fadeOutResolver(),this._fadeOutResolver=null)}remove(){this.parent?.removeChild(this)}setTransform(a){}processRender(a){this.stage&&this.computedVisible&&this.doRender(a)}requestRender(){this.stage&&this.stage.requestRender()}processDetach(){this._fadeInResolver&&(this._fadeInResolver(),this._fadeInResolver=null);this._fadeOutResolver&&(this._fadeOutResolver(), |
|
this._fadeOutResolver=null);this.onDetach();this.emit("detach")}updateTransitionProperties(a,b){const g=0===e("mapview-transitions-duration")?0:1/e("mapview-transitions-duration");if(this.fadeTransitionEnabled&&0!==g){b=this._fadeOutResolver||!this.visible?0:this.opacity;const c=this.computedOpacity;c===b?this.computedVisible=this.visible:(a*=g,this.computedOpacity=c>b?Math.max(b,c-a):Math.min(b,c+a),this.computedVisible=0<this.computedOpacity,a=b===this.computedOpacity,this.inFadeTransition=!a,a|| |
|
this.requestRender())}else this.computedOpacity=this.opacity,this.computedVisible=this.visible}onAttach(){}onDetach(){}doRender(a){}ready(){this._isReady||(this._isReady=!0,this.emit("isReady"),this.requestRender())}}d.DisplayObject=k;Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}); |