[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeexamples/plasma/javascript/plasmoids/animations/contents/code
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2010-01-12 11:50:00
Message-ID: 1263297000.743718.7016.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1073575 by aseigo:

direction is updated immediately now, so set it before starting the anim


 M  +4 -4      main  


--- trunk/KDE/kdeexamples/plasma/javascript/plasmoids/animations/contents/code/main \
#1073574:1073575 @@ -61,7 +61,6 @@
 rotateAnimation = animation('rotate')
 rotateAnimation.angle = 180
 rotateAnimation.targetWidget = button
-rotateAnimation.easingCurveType = InOutQuadEasingCurve
 
 // Now we will add them to a group to run in parallel with each other
 // this coordinates the animations for us and we will just use the animation
@@ -69,15 +68,16 @@
 rotateAndFadeAnimationGroup = new ParallelAnimationGroup
 rotateAndFadeAnimationGroup.addAnimation(fadeAnimation)
 rotateAndFadeAnimationGroup.addAnimation(rotateAnimation)
+rotateAndFadeAnimationGroup.direction = AnimationBackward;
 
 // this function will be triggered by the 'Rotate and Fade' button being clicked
 startRotateAndFadeAnimation = function()
 {
+    // now reverse the direction for the next click!
+    rotateAndFadeAnimationGroup.direction = rotateAndFadeAnimationGroup.direction == \
AnimationForward ? AnimationBackward : AnimationForward; +
     // start the animation
     rotateAndFadeAnimationGroup.start()
-
-    // now reverse the direction for the next click!
-    rotateAndFadeAnimationGroup.direction = rotateAndFadeAnimationGroup.direction == \
AnimationForward ? AnimationBackward : AnimationForward;  }
 // connect the clicked signal to our function above
 button.clicked.connect(startRotateAndFadeAnimation);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic