Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8320] MobileWeb: Add support for autoreverse and repeat in animations

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-12-21T05:42:56.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sSprint 2012-14 Core, Release 3.0.0
ComponentsMobileWeb
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2012-03-26T17:30:25.000+0000
Updated2012-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

FileDateSize
app.js2012-07-16T11:45:41.000+00002469

Comments

  1. Chris Barber 2012-07-16

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/2576
  2. Lokesh Choudhary 2012-08-07

    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

JSON Source