Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18298] iOS: changing autoreverse value to true from false stops animation

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.5.0
ReporterVisalakshi Chidambaram
AssigneeUnknown
Created2014-12-30T09:51:00.000+0000
Updated2018-02-28T19:55:50.000+0000

Description

This is not a regression as it is also reproducible with titanium sdk 3.4.1 When the autoreverse property's value is changed from false to true, it prevents the animation from occurring after the change in value. Steps to reproduce: 1. copy the following code into app.js and run on device


    var win = Ti.UI.createWindow({
        backgroundColor: '#fff'
    });
    var transform = Ti.UI.create2DMatrix().rotate(90);

    var v = Ti.UI.createView({
        right: "10dp",
        width: "100dp",
        height: "100dp",
        top: "10dp",
        backgroundColor: "red"
    });

    win.add(v);

    
  var reverse = false;

    v.addEventListener("click", function() {

		Ti.API.info("Value of reverse" + reverse);
        v.animate({
            transform: transform,
            duration: 500,
            autoreverse: reverse,
            repeat: 2
        });
        
        reverse= !reverse;
    });

    win.open();

2. Click on the red square 3. Click again on the red square Actual Results: 2. The red square is animated, and the value of reverse printed on console will be 'false' 3. The red square does not animate/move anymore, the value of reverse printed on console is 'true' Expected Results: 2. The red square is animated, and the value of reverse printed on console will be 'false' 3. The red square should be animated, the value of reverse printed on console is 'true'

Comments

No comments

JSON Source