goog.fx.dom.FadeOutAndHide
Provided By | |
---|---|
Extends | |
All Implemented Interfaces |
Fades an element out from full opacity to completely transparent and then sets the display to 'none'
new FadeOutAndHide( element, time, opt_acc )
Parameters |
|
---|
Instance Methods
this.addEventListener( type, handler, opt_capture, opt_handlerScope ) → void
void
Adds an event listener to the event target. The same handler can only be added once per the type. Even if you add the same handler multiple times using the same type then it will only be called once when the event is dispatched.
warning Deprecated | Use |
---|
Defined by | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
this.addOnDisposeCallback<T>( callback, opt_scope ) → void
void
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added. If a callback is added to an already disposed Disposable, it will be called immediately.
Defined by | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
this.cycle( now ) → void
void
Handles the actual iteration of the animation in a timeout
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.destroy() → void
void
Stops an animation, fires a 'destroy' event and then removes all the event handlers to clean up memory.
warning Deprecated | Use dispose() instead. |
---|
Defined by | |
---|---|
Parameters | None. |
this.dispatchAnimationEvent( type ) → void
void
Dispatches an event object for the current animation.
Defined by | |||||
---|---|---|---|---|---|
Overrides | |||||
Parameters |
|
this.dispatchEvent( e ) → boolean
boolean
Dispatches an event (or event like object) and calls all listeners listening for events of this type. The type of the event is decided by the type property on the event object.
If any of the listeners returns false OR calls preventDefault then this function will return false. If one of the capture listeners calls stopPropagation, then the bubble listeners won't fire.
Overrides | |||||
---|---|---|---|---|---|
Specified by | |||||
Parameters |
| ||||
Returns |
|
this.dispose() → ?
?
Disposes of the object and its resources.
Overrides | ||
---|---|---|
Specified by | ||
Parameters | None. | |
Returns |
|
this.disposeInternal() → void
void
Disposes of the animation. Stops an animation, fires a 'destroy' event and then removes all the event handlers to clean up memory.
Defined by | |
---|---|
Overrides | |
Parameters | None. |
this.enableRightPositioningForRtl( useRightPositioningForRtl ) → void
void
Sets whether the animation should use "right" rather than "left" to position elements. This is a temporary flag to allow clients to transition to the new component at their convenience. At some point "right" will be used for RTL elements by default.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.fireListeners<EVENTOBJ>( type, capture, eventObject ) → boolean
boolean
Fires all registered listeners in this listenable for the given type and capture mode, passing them the given eventObject. This does not perform actual capture/bubble. Only implementors of the interface should be using this.
Overrides | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||||||
Parameters |
| ||||||||||||
Returns |
|
this.getDisposed() → boolean
boolean
warning Deprecated | Use |
---|
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getDuration() → number
number
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getListener<SCOPE, EVENTOBJ>( type, listener, capture, opt_listenerScope ) → (goog.events.ListenableKey|null)
(goog.events.ListenableKey|null)
Gets the goog.events.ListenableKey for the event or null if no such listener is in use.
Overrides | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||||||||||
Parameters |
| ||||||||||||||||
Returns |
|
this.getListeners<EVENTOBJ>( type, capture ) → Array<goog.events.ListenableKey>
Array<goog.events.ListenableKey>
Gets all listeners in this listenable for the given type and capture mode.
Overrides | |||||||||
---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||
Parameters |
| ||||||||
Returns |
|
this.getParentEventTarget() → (goog.events.Listenable|null)
(goog.events.Listenable|null)
Returns the parent of this event target to use for capture/bubble mechanism.
NOTE(chrishenry): The name reflects the original implementation of
custom event target (goog.events.EventTarget
). We decided
that changing the name is not worth it.
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.getProgress() → number
number
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getStateInternal() → goog.fx.TransitionBase.State
goog.fx.TransitionBase.State
Returns the current state of the animation.
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.hasListener<EVENTOBJ>( opt_type, opt_capture ) → boolean
boolean
Whether there is any active listeners matching the specified signature. If either the type or capture parameters are unspecified, the function will match on the remaining criteria.
Overrides | |||||||||
---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||
Parameters |
| ||||||||
Returns |
|
this.hide() → void
void
Animation event handler that will hide the element
this.isDisposed() → boolean
boolean
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.isPaused() → boolean
boolean
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.isPlaying() → boolean
boolean
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.isRightPositioningForRtlEnabled() → boolean
boolean
Whether the animation should use "right" rather than "left" to position elements. This is a temporary flag to allow clients to transition to the new component at their convenience. At some point "right" will be used for RTL elements by default.
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.isRightToLeft() → boolean
boolean
Whether the DOM element being manipulated is rendered right-to-left.
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.isStopped() → boolean
boolean
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.listen<SCOPE, EVENTOBJ>( type, listener, opt_useCapture, opt_listenerScope ) → goog.events.ListenableKey
goog.events.ListenableKey
Adds an event listener. A listener can only be added once to an object and if it is added again the key for the listener is returned. Note that if the existing listener is a one-off listener (registered via listenOnce), it will no longer be a one-off listener after a call to listen().
Overrides | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||||||||||
Parameters |
| ||||||||||||||||
Returns |
|
this.listenOnce<SCOPE, EVENTOBJ>( type, listener, opt_useCapture, opt_listenerScope ) → goog.events.ListenableKey
goog.events.ListenableKey
Adds an event listener that is removed automatically after the listener fired once.
If an existing listener already exists, listenOnce will do nothing. In particular, if the listener was previously registered via listen(), listenOnce() will not turn the listener into a one-off listener. Similarly, if there is already an existing one-off listener, listenOnce does not modify the listeners (it is still a once listener).
Overrides | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||||||||||
Parameters |
| ||||||||||||||||
Returns |
|
this.onAnimate() → void
void
Dispatches the ANIMATE event. Sub classes should override this instead of listening to the event.
Defined by | |
---|---|
Overrides | |
Parameters | None. |
this.onAnimationFrame( now ) → void
void
Function called when a frame is requested for the animation.
Overrides | |||||
---|---|---|---|---|---|
Specified by | |||||
Parameters |
|
this.onBegin() → void
void
Dispatches the BEGIN event. Sub classes should override this instead of listening to the event, and call this instead of dispatching the event.
Overrides | |
---|---|
Parameters | None. |
this.onDestroy() → void
void
Dispatches the DESTROY event. Sub classes should override this instead of listening to the event.
this.onEnd() → void
void
Dispatches the END event. Sub classes should override this instead of listening to the event, and call this instead of dispatching the event.
Overrides | |
---|---|
Parameters | None. |
this.onFinish() → void
void
Dispatches the FINISH event. Sub classes should override this instead of listening to the event, and call this instead of dispatching the event.
this.onPause() → void
void
Dispatches the PAUSE event. Sub classes should override this instead of listening to the event, and call this instead of dispatching the event.
this.onPlay() → void
void
Dispatches the PLAY event. Sub classes should override this instead of listening to the event, and call this instead of dispatching the event.
this.onResume() → void
void
Dispatches the RESUME event. Sub classes should override this instead of listening to the event, and call this instead of dispatching the event.
this.onStop() → void
void
Dispatches the STOP event. Sub classes should override this instead of listening to the event, and call this instead of dispatching the event.
this.pause() → void
void
Pauses the animation (iff it's playing).
Defined by | |
---|---|
Overrides | |
Parameters | None. |
this.play( opt_restart ) → boolean
boolean
this.registerDisposable( disposable ) → void
void
Associates a disposable object with this object so that they will be disposed together.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.removeAllListeners( opt_type ) → number
number
Removes all listeners from this listenable. If type is specified, it will only remove listeners of the particular type. otherwise all registered listeners will be removed.
Overrides | |||||
---|---|---|---|---|---|
Specified by | |||||
Parameters |
| ||||
Returns |
|
this.removeEventListener( type, handler, opt_capture, opt_handlerScope ) → void
void
Removes an event listener from the event target. The handler must be the same object as the one added. If the handler has not been added then nothing is done.
warning Deprecated | Use |
---|
Defined by | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
this.setParentEventTarget( parent ) → void
void
Sets the parent of this event target to use for capture/bubble mechanism.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.setProgress( progress ) → void
void
Sets the progress of the animation.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.setStatePaused() → void
void
Sets the current state of the animation to paused.
this.setStatePlaying() → void
void
Sets the current state of the animation to playing.
this.setStateStopped() → void
void
Sets the current state of the animation to stopped.
this.setTargetForTesting( target ) → void
void
Sets the target to be used for event.target
when firing
event. Mainly used for testing. For example, see
goog.testing.events.mixinListenable
.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.show() → void
void
Animation event handler that will show the element.
this.stop( opt_gotoEnd ) → void
void
Stops the animation.
Overrides | |||||
---|---|---|---|---|---|
Specified by | |||||
Parameters |
|
this.unlisten<SCOPE, EVENTOBJ>( type, listener, opt_useCapture, opt_listenerScope ) → boolean
boolean
Removes an event listener which was added with listen() or listenOnce().
Overrides | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||||||||||
Parameters |
| ||||||||||||||||
Returns |
|
this.unlistenByKey( key ) → boolean
boolean
Removes an event listener which was added with listen() by the key returned by listen().
Overrides | |||||
---|---|---|---|---|---|
Specified by | |||||
Parameters |
| ||||
Returns |
|
this.updateStyle() → void
void
Animation event handler that will set the opacity of an element.
Defined by | |
---|---|
Overrides | |
Parameters | None. |
Instance Properties
Current coordinate for animation.
this.creationStack → (string|undefined)
(string|undefined)
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
this.duration → number
number
Duration of animation in milliseconds.
this.element → (Element|null)
(Element|null)
DOM Node that will be used in the animation
End point.
this.endTime → (number|null)
(number|null)
Timestamp for when the animation finished or was stopped.
this.lastFrame → (number|null)
(number|null)
Timestamp for when last frame was run.
this.progress → number
number
Percent of the way through the animation.
Start point.
this.startTime → (number|null)
(number|null)
Timestamp for when the animation was started.