Yahoo! UI Library

widget-anim  3.1.0

Yahoo! UI Library > widget-anim > Plugin.WidgetAnim
Search:
 
Filters

Class Plugin.WidgetAnim - extends Plugin.Base

A plugin class which can be used to animate widget visibility changes.

Properties

WidgetAnim.ANIMATIONS - static Object

Pre-Packaged Animation implementations, which can be used for animShow and animHide attribute values.
Default Value: "pluginWidgetAnim"

WidgetAnim.ATTRS - static Object

Static property used to define the default attribute configuration for the plugin.

WidgetAnim.NAME - static String

The NAME of the WidgetAnim class. Used to prefix events generated by the plugin class.
Default Value: "pluginWidgetAnim"

WidgetAnim.NS - static String

The namespace for the plugin. This will be the property on the widget, which will reference the plugin instance, when it's plugged in.
Default Value: "anim"

Properties inherited from Attribute:

Properties inherited from Base:

Properties inherited from Plugin.Base:

Methods

_bindAnimHide

private void _bindAnimHide ( )
Binds a listener to invoke the original visibility handling when the animHide animation is complete

_bindAnimShow

private void _bindAnimShow ( )
Binds a listener to invoke the original visibility handling when the animShow animation is started

_uiAnimSetVisible

protected void _uiAnimSetVisible ( val )
The injected method used to override the host widget's _uiSetVisible implementation with an animated version of the same.

This method replaces the default _uiSetVisible handler Widget provides, by injecting itself before _uiSetVisible, and preventing the default behavior.

Parameters:
val <boolean> true, if making the widget visible. false, if hiding it.

_uiSetVisible

private void _uiSetVisible ( val )
The original Widget _uiSetVisible implementation. This currently needs to be replicated, so it can be invoked before or after the animation starts or stops, since the original methods is not available to the AOP implementation.
Parameters:
val <boolean> true, if making the widget visible. false, if hiding it.

destructor

void destructor ( )
The initializer destructor implementation. Responsible for destroying the configured animation instances.

initializer

void initializer ( config )
The initializer lifecycle implementation. Modifies the host widget's visibililty implementation to add animation.
Parameters:
config <Object> The user configuration for the plugin

Events

animHideChange

animHideChange ( event )
Fires when the value for the configuration attribute 'animHide' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

animShowChange

animShowChange ( event )
Fires when the value for the configuration attribute 'animShow' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

durationChange

durationChange ( event )
Fires when the value for the configuration attribute 'duration' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Events inherited from Base:

Events inherited from Plugin.Base:

Configuration Attributes

animHide - Anim

Default animation instance used for hiding the widget (opacity fade-out)
Default Value: WidgetAnim.ANIMATIONS.fadeOut

animShow - Anim

Default animation instance used for showing the widget (opacity fade-in)
Default Value: WidgetAnim.ANIMATIONS.fadeIn

duration - Number

Default duration in seconds. Used as the default duration for the default animation implementations
Default Value: 0.2 (seconds

Configuration attributes inherited from Base:

Configuration attributes inherited from Plugin.Base:


Copyright © 2010 Yahoo! Inc. All rights reserved.