Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11406] iOS: Animation - Orientation during animation will cause objects to change size and position

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-12-18T21:40:15.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.1, Release 3.1.0, 2012 Sprint 26 API, 2012 Sprint 26
ComponentsiOS
Labelscore, module_animation, qe-ios100112, qe-testadded
ReporterOlga Romero
AssigneeVishal Duggal
Created2012-10-12T00:34:41.000+0000
Updated2014-06-19T12:43:23.000+0000

Description

Description: Objects change position and size, if device rotated during animation. This is not a regression, occurs in 2.1.3 as well Test steps: 1. Run this code:
var win = Ti.UI.createWindow({
    backgroundColor:'green'
});
 
var box = Ti.UI.createView({
			    backgroundColor : 'red',
			    height : '150dp',
			    width : '100dp',
			    top: '50dp'
			});
			 
			box.addEventListener('click', function() {
			    var matrix = Ti.UI.create2DMatrix().scale(1.5, 1.5);
			    var a = Ti.UI.createAnimation({
			        transform : matrix,
			        duration : 500,
			        autoreverse : true,
			        repeat : 2
			    });
			    box.animate(a);
			});
			win.add(box);
			 
			var box2 = Ti.UI.createView({
			    backgroundColor: "blue",
			    top: "285dp",
			    height: "100dp",
			    width: "100dp"
			});
			 
			box2.addEventListener("click", function() {
			    var matrix = Ti.UI.create2DMatrix().rotate(97);
			    box2.animate({transform: matrix, duration: 500, autoreverse: true, repeat: 2});
			});
        win.add(box2);
win.open();
2. Click on the Red Box 3. Now click on the Blue Box 4. Rotate device and click boxes repeatedly Actual result: See attachments Expected result: The red box should twice grow in size and shrink back The blue box should rotate Note: App could freez

Attachments

FileDateSize
anim_rotation_ios6.png2012-10-12T00:34:41.000+000075445

Comments

  1. Vishal Duggal 2012-12-07

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/3556
  2. Vishal Duggal 2012-12-27

    Backport PR to 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3639
  3. Shyam Bhadauria 2013-01-03

    Animation do not changes size or position on orientation. Verified with following Titanium SDK: 3.1.0.v20130102102603 Titanium SDK:3.0.1.v20121228113204 Titanium Studio:3.0.1.201212181159 Device: iPad3 iOS 5.1 iPad4 iOs 6.0

JSON Source