[TIMOB-8320] MobileWeb: Add support for autoreverse and repeat in animations
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-12-21T05:42:56.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Sprint 2012-14 Core, Release 3.0.0 |
Components | MobileWeb |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2012-03-26T17:30:25.000+0000 |
Updated | 2012-12-21T05:42:56.000+0000 |
Description
autoreverse and repeat is not implemented. Need to capture the current state of the object, then after the animation finishes, need to restore to original state. Do this for however many times to repeat.
var box = Ti.UI.createView({
backgroundColor : 'red',
height : '150',
width : '100'
});
box.addEventListener('click', function() {
var matrix = Ti.UI.create2DMatrix()
matrix = matrix.rotate(90);
matrix = matrix.scale(2, 2);
var a = Ti.UI.createAnimation({
transform : matrix,
duration : 2000,
autoreverse : true, // IGNORED!!
repeat : 3
});
box.animate(a);
});
Attachments
File | Date | Size |
---|---|---|
app.js | 2012-07-16T11:45:41.000+0000 | 2469 |
Pull request: https://github.com/appcelerator/titanium_mobile/pull/2576
Tested On: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120807070117 Android 4.0.4 - default ,chrome 18.0 Iphone 4.3.5 - safari mobile Mountain lion(10.8) - chrome 21.0,safari 5.1.4,firefox 14.0.1