[TIMOB-11406] iOS: Animation - Orientation during animation will cause objects to change size and position
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-12-18T21:40:15.000+0000 |
| Affected Version/s | Release 3.0.0 |
| Fix Version/s | Release 3.0.1, Release 3.1.0, 2012 Sprint 26 API, 2012 Sprint 26 |
| Components | iOS |
| Labels | core, module_animation, qe-ios100112, qe-testadded |
| Reporter | Olga Romero |
| Assignee | Vishal Duggal |
| Created | 2012-10-12T00:34:41.000+0000 |
| Updated | 2014-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
| File | Date | Size |
|---|---|---|
| anim_rotation_ios6.png | 2012-10-12T00:34:41.000+0000 | 75445 |
Pull pending https://github.com/appcelerator/titanium_mobile/pull/3556
Backport PR to 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3639
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