Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17262] iOS: Issue with view animation when clicked on animating view in its last repeat cycle

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2014-07-08T20:29:15.000+0000
Affected Version/sRelease 3.3.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.3.0
ReporterSatyam Sekhri
AssigneeVishal Duggal
Created2014-07-02T07:34:26.000+0000
Updated2017-03-22T23:00:41.000+0000

Description

The animating view has an issue when we click on it while it is in its last repeat cycle of animation and while it is reversing to original position. This is a regression as the issue does not occur in 3.2.3.GA The issue does not occur on Android. Refer to the attached video. Steps to Reproduce: 1. Create an app with the code below. 2. Build and launch the app on iOS device 3. Click on red view. The red view has an animation repeat count of 3. 4. Click again on the red view during its third repeat cycle of animation when it has just got to its maximum scaled size or when it is getting back to original position 5. Click on blue view. The blue view has an animation repeat count of 2 6. Click again on blue view in its last repeat of the animation when it has rotated and about to go back to original position. Actual Result: After Step 4 and 6, the view seems to start the whole animation again but only with a limited animation.
var win = Ti.UI.createWindow({
    backgroundColor:'green'
});
   
var box = Ti.UI.createView({
                backgroundColor : 'red',
                height : '150dp',
                width : '100dp',
                top: '50dp',
                overrideCurrentAnimation: true
            });
               
            box.addEventListener('click', function() {
                var matrix = Ti.UI.create2DMatrix().scale(1.5, 1.5);
                var a = Ti.UI.createAnimation({
                    transform : matrix,
                    duration : 500,
                    autoreverse : true,
                    repeat : 3
                });
                box.animate(a);
            });
            win.add(box);
               
            var box2 = Ti.UI.createView({
                backgroundColor: "blue",
                top: "285dp",
                height: "100dp",
                width: "100dp",
                overrideCurrentAnimation: false
            });
               
            box2.addEventListener("click", function() {
                var matrix = Ti.UI.create2DMatrix().rotate(97);
                box2.animate({transform: matrix, duration: 500, autoreverse: true, repeat: 2});
            });
        win.add(box2);
win.open();

Attachments

FileDateSize
AnimationIssue.mov2014-07-02T07:34:26.000+00001068874

Comments

  1. Samuel Dowse 2014-07-08

    Issue is reproducible on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.3.0.201407031747 Titanium SDK, build: 3.3.0.v20140707105712 Titanium CLI, build: 3.3.0-rc4 Alloy: 1.4.0-rc4 iOS Device: iPhone 5S (7.1.1) Animation restarts if clicked again before finishing.
  2. Vishal Duggal 2014-07-08

    This is not a regression. This behavior is reproducible all the way back to 3.1.4 iOS lets you chain animations without waiting for the first one to finish. In that case we start the second animation from the views current state. Changing this behavior will cause regressions in other areas. Marking this as wont fix.
  3. Lee Morris 2017-03-22

    Closing ticket as "Won't Fix".

JSON Source