Finaly, here is my code (sorry about the presentation. copy&paste is not the
best way)

        //like drop in. the I use it is calling first hide routine so the
widget is hidden before this effect.
        //first it moves the object up (verticaly). it's hidden so you don't
see this.
        //then, it does move and fade in parallel: move down verticaly and
fade it at the same time.
        //@param obj {Widget}
        persian : function(obj)
        {
                        var dom         = 
obj.getContainerElement().getDomElement();
                        var temp        = new qx.fx.effect.core.Move(dom);      
                temp.set({
                                duration   : 0,
                                y          : -50
            });
                temp.addListener("finish",function(){
                                var move        = new 
qx.fx.effect.core.Move(dom);                              
                                var fade        = new 
qx.fx.effect.core.Fade(dom);                              
                                var both        = new 
qx.fx.effect.core.Parallel(move,fade);
                                
                        move.set({
                                        duration   : 1,
                                        y          : 50,
                                        transition : "easeOutQuad" //"spring"
                    });
                        
                        fade.set({
                                duration        : 2,
                                from            : 0,
                                to                      : 1,
                                transition      : "easeOutQuad" //"spring"
                        });
                        
                        both.start();                   
                },this);
                temp.start();
        },

        //hides a widget before using persian effect.
        //I've found that the object must exist to be animated, so I "hide"
it using opacity to 0.01.
        //it's still there, but "almost" invisible, so it keeps all view
properties like position and size.
        //@params obj {Widget}
        hide : function(obj)
        {
                        var dom         = 
obj.getContainerElement().getDomElement();
                        var temp        = new qx.fx.effect.core.Fade(dom);      
                temp.set({
                                duration        : 0,
                                from            : 1,
                                to                      : 0.01
            });
                temp.start();
        }//,        

Enjoy!


-----
la vida es una incesante cadena de oportunidades para aprender y triunfar.
life is an endless chain of opportunities to learn and succeed.

lo más importante: ser selectivo, responsable y perseverante.
the most importantly: to be selective, responsible and persevering.
--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/problem-animating-a-widget-tp6621553p6623376.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to