Hi List,

 

inspired from Herman Gomez i wrote a little fadeIn / out function. I decided
to share because in some cases dom element of widgets are not created
immediately. So hope it shows interested ones a easy way to make animated
widgets. By the way, how about a standard set of functions from the core
team?

 

fadeIn : function(obj, from, to, duration, transition)

                        {

                                   // prevent flickering

                                   obj.setOpacity(0);

                                   

                                   // just wait until dom is created

                                   var timer =
qx.util.TimerManager.getInstance();

                                   timer.start(function(userData, timerId)

                                   {

                                               var dom           =
obj.getContainerElement().getDomElement();

                                               var fx   = new
qx.fx.effect.core.Fade(dom);

                                   

                                               if (from != null)

                                               {

                                                           fx.setFrom(from);

                                               }

                                               else

                                               {

                                                           fx.setFrom(0);

                                               }

 

                                               if (to != null)

                                               {

                                                           fx.setTo(to);

                                               }

                                               else

                                               {

                                                           fx.setTo(1);

                                               }

 

                                               if (duration != null)

                                               {

 
fx.setDuration(duration);

                                               }

 

                                               if (transition != null)

                                               {

 
fx.setTransition(transition);

                                               }

                                               

                                               fx.addListener("finish",
function(e)

                                               {

 
obj.setOpacity(null);

                                               });

                                               fx.start();

                                   });

                                   

                        },

 

Regrdas Sak


 


SAKsystems

Inh. Mustafa Sak

Varrelmannstr. 16

30453 Hannover

Tel.   +49 511 / 165 969 40

Fax   +49 511 / 165 969 49

Mobil +49 163 / 312 6144

http://www.saksys.de <http://www.saksys.de/> 

 <mailto:[email protected]> [email protected]

STEUER-Nr. 2613817458

 

<<attachment: Mustafa Sak ([email protected]).vcf>>

------------------------------------------------------------------------------
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