Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6793] iOS: Animation with autoreverse sets color incorrectly on completion

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2012-07-19T15:48:05.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterArthur Evans
AssigneeNeeraj Gupta
Created2011-12-20T15:16:15.000+0000
Updated2017-03-09T21:31:15.000+0000

Description

When I create an animation that specifies both backgroundColor and autoreverse, it animates as expected, but when the animation completes the view's background color reverts to the background color assigned to the animation, not the view's original color. Consider the following code: app.js

var win1 = Ti.UI.createWindow({backgroundColor: "white"});
var view = Ti.UI.createView({height: 100, width: 100, backgroundColor: "green"});
win1.add(view);
win1.open();

var matrix = Ti.UI.create2DMatrix();
matrix = matrix.rotate(45);
matrix = matrix.scale(1.5, 1.5);
view.addEventListener('click', function(e) {
	view.animate({ autoreverse: true, 
		transform: matrix, duration: 500, backgroundColor: 'red'});
});
When I click the green view, it animates to red, then back to green. But as soon as the animation completes, the view switches back to red. Expected behavior: View stays green after animation completes.

Comments

  1. Stephen Tramer 2012-07-19

    Marking as a dupe in favor of more comprehensive bug TIMOB-10047.
  2. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source