Yahoo! UI Library

Container  2.9.0

Yahoo! UI Library > container > YAHOO.widget.ContainerEffect
Search:
 
Filters

Class YAHOO.widget.ContainerEffect

ContainerEffect encapsulates animation transitions that are executed when an Overlay is shown or hidden.

Constructor

YAHOO.widget.ContainerEffect ( overlay , attrIn , attrOut , targetElement , Optional. )
Parameters:
overlay <YAHOO.widget.Overlay> The Overlay that the animation should be associated with
attrIn <Object> The object literal representing the animation arguments to be used for the animate-in transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. Easing.easeIn).
attrOut <Object> The object literal representing the animation arguments to be used for the animate-out transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. Easing.easeIn).
targetElement <HTMLElement> Optional. The target element that should be animated during the transition. Defaults to overlay.element.
Optional. <class> The animation class to instantiate. Defaults to YAHOO.util.Anim. Other options include YAHOO.util.Motion.

Properties

animClass - class

The animation class to use for animating the overlay

attrIn - Object

The animation attributes to use when transitioning into view

attrOut - Object

The animation attributes to use when transitioning out of view

lastFrameOnStop - boolean

Flag to define whether Anim should jump to the last frame, when animateIn or animateOut is stopped.
Default Value: true

overlay - YAHOO.widget.Overlay

The overlay to animate

targetElement - HTMLElement

The target element to be animated

Methods

_stopAnims

protected void _stopAnims ( finish )
Stops both animIn and animOut instances, if in progress.
Parameters:
finish <boolean> If true, animation will jump to final frame.

animateIn

void animateIn ( )
Triggers the in-animation.

animateOut

void animateOut ( )
Triggers the out-animation.

FADE

static YAHOO.widget.ContainerEffect FADE ( overlay , dur )
A pre-configured ContainerEffect instance that can be used for fading an overlay in and out.
Parameters:
overlay <YAHOO.widget.Overlay> The Overlay object to animate
dur <Number> The duration of the animation
Returns: YAHOO.widget.ContainerEffect
The configured ContainerEffect object

handleCompleteAnimateIn

void handleCompleteAnimateIn ( type , args , obj )
The default onComplete handler for the in-animation.
Parameters:
type <String> The CustomEvent type
args <Object[]> The CustomEvent arguments
obj <Object> The scope object

handleCompleteAnimateOut

void handleCompleteAnimateOut ( type , args , obj )
The default onComplete handler for the out-animation.
Parameters:
type <String> The CustomEvent type
args <Object[]> The CustomEvent arguments
obj <Object> The scope object

handleStartAnimateIn

void handleStartAnimateIn ( type , args , obj )
The default onStart handler for the in-animation.
Parameters:
type <String> The CustomEvent type
args <Object[]> The CustomEvent arguments
obj <Object> The scope object

handleStartAnimateOut

void handleStartAnimateOut ( type , args , obj )
The default onStart handler for the out-animation.
Parameters:
type <String> The CustomEvent type
args <Object[]> The CustomEvent arguments
obj <Object> The scope object

handleTweenAnimateIn

void handleTweenAnimateIn ( type , args , obj )
The default onTween handler for the in-animation.
Parameters:
type <String> The CustomEvent type
args <Object[]> The CustomEvent arguments
obj <Object> The scope object

handleTweenAnimateOut

void handleTweenAnimateOut ( type , args , obj )
The default onTween handler for the out-animation.
Parameters:
type <String> The CustomEvent type
args <Object[]> The CustomEvent arguments
obj <Object> The scope object

init

void init ( )
Initializes the animation classes and events.

SLIDE

static YAHOO.widget.ContainerEffect SLIDE ( overlay , dur )
A pre-configured ContainerEffect instance that can be used for sliding an overlay in and out.
Parameters:
overlay <YAHOO.widget.Overlay> The Overlay object to animate
dur <Number> The duration of the animation
Returns: YAHOO.widget.ContainerEffect
The configured ContainerEffect object

toString

String toString ( )
Returns a string representation of the object.
Returns: String
The string representation of the ContainerEffect


Copyright © 2011 Yahoo! Inc. All rights reserved.