Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23169

Windows: Animations are not animating correctly on iterations or bucles

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Duplicate
    • Affects Version/s: Release 5.2.0, Release 5.2.1, Release 5.2.2
    • Fix Version/s: Release 5.3.0
    • Component/s: Windows
    • Labels:
      None
    • Environment:

      Windows 8
      Visual Studio 2015 Community edition
      Appcelerator SDK 5.1.0 5.2.0

    • Story Points:
      5

      Description

      Issue Description

      When an animation is inserted inside a iteration or bucle, the animation is running just the first time.

      Steps to Replicate
      1. Create a new appcelerator alloy project for windows
      2. Open Index.xml and replace the code with the next:

        <Alloy>
        	<Window class="container">
        		<!--Label id="label" onClick="doClick">Hello, World</Label-->
        		<View id='test' height='100' width='100' left='0' backgroundColor='red'/>
        	</Window>
        </Alloy>
        

      3. Open Index.js and replace the code with the next:

        function animateBox() {
            var animation = Titanium.UI.createAnimation();
        	//animation.backgroundColor = 'black';
        	animation.left = 100;
        	animation.duration = 1000;
        	var animationBack = Titanium.UI.createAnimation();	
        	var animationHandler = function() {
        	  //animation.removeEventListener('complete',animationHandler);
        	  //animation.left = 0;
        	  //animation.duration = 1000;
        	  $.test.left = 100;
        	  var animateBack = Ti.UI.createAnimation();
        	  animateBack.left = 0;
        	  animateBack.duration = 1000;
        	  $.test.animate(animateBack);
        	  
        	  
        	  var animationHandlerBack = function() {
        	  	//animationBack.removeEventListener('complete',animationHandlerBack);
        	  	animationBack.left = 0;
        	  	
        	  };	  
        	  animation.addEventListener('complete',animationHandlerBack);
        	};
        	animation.addEventListener('complete',animationHandler);
        	$.test.animate(animation);	
        }
         
        setTimeout(animateBox, 2000);
         
        $.index.open();
        

      4. Run
      5. The box is just animating once
      Expected Behavior

      The animations should repeat.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                rramirez Ricardo Ramirez
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-9610
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code