[TIMOB-6793] iOS: Animation with autoreverse sets color incorrectly on completion
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2012-07-19T15:48:05.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Arthur Evans |
| Assignee | Neeraj Gupta |
| Created | 2011-12-20T15:16:15.000+0000 |
| Updated | 2017-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.
Marking as a dupe in favor of more comprehensive bug TIMOB-10047.
Closing ticket as duplicate.