Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10047] iOS: Animation "autoreverse" does not reverse all properties

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-07-25T16:15:17.000+0000
Affected Version/sn/a
Fix Version/sSprint 2012-15 Core, Release 3.0.0
ComponentsiOS
Labelscore, module_animation, qe-testadded
ReporterStephen Tramer
AssigneeNeeraj Gupta
Created2012-07-19T15:47:41.000+0000
Updated2012-08-13T13:42:50.000+0000

Description

It turns out that autoreverse on animations does not reverse all properties set - in fact, it only reverses layout changes and transforms. Alpha, visibility, color, etc. are all left at the animation's "final" value.
var win = Ti.UI.createWindow();

var view = Ti.UI.createView({
	backgroundColor:'green',
	width:100,
	height:100
});
view.addEventListener('click', function() {
	view.animate({
		autoreverse:true,
		repeat:2,
		backgroundColor:'blue',
		color:'red',
		opacity:'0.1',
		opaque:false,
//		visible:false // uncomment this to see visibility
	})
});
win.add(view);

win.open();

Comments

  1. Max Stepanov 2012-07-25

    PR merged https://github.com/appcelerator/titanium_mobile/pull/2630

JSON Source