public void queueAnimation ( final GQAnimation anim , final int duration ) { if ( isOff ( ) ) { anim . onStart ( ) ; anim . onComplete ( ) ; } else { queue ( anim . e , DEFAULT_NAME , new Function ( ) { public void cancel ( Element e ) { Animation anim = ( Animation ) data ( e , GQAnimation . ACTUAL_ANIMATION , null ) ; if ( anim != null ) { anim . cancel ( ) ; } } public void f ( Element e ) { anim . run ( duration ) ; } } ) ; } }
Queue an animation for an element .