[TIMOB-18049] Andriod and Mobile Web: Rotation issues in 2DMatrix
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Won't Fix |
| Resolution Date | 2017-06-29T18:42:09.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android, MobileWeb |
| Labels | 2DMatrix, Android, MobileWeb, Rotation |
| Reporter | Joseba Alonso |
| Assignee | Eric Merriman |
| Created | 2014-11-08T09:14:30.000+0000 |
| Updated | 2017-08-16T01:10:21.000+0000 |
Description
Hi,
It appears you cant rotate a matrix that you configure with rotation. This gives you a runtime error:
var matrix = Ti.UI.create2DMatrix({
rotate: 45
});
matrix.rotate(45);
Message: Uncaught TypeError: Property 'rotate' of object #<2DMatrix> is not a function
Problem can be reproduced on Android and Mobile Web. Work well on IOS. Here is sample test case:
var win = Ti.UI.createWindow({ backgroundColor: 'white' }); var label = Ti.UI.createLabel({ font:{fontSize:50}, text:'Titanium', textAlign:'center', top: 100 }); win.add(label); var button = Ti.UI.createButton({ title:'Animate', bottom:20, width:200, height:40 }); win.add(button); button.addEventListener('click', function(){ var t1 = Ti.UI.create2DMatrix({ rotate:15 }); t1 = t1.rotate(30); t1 = t1.translate(0, 300); var a1 = Ti.UI.createAnimation(); a1.transform = t1; a1.duration = 800; label.animate(a1); }); win.open();Only work around is do not configure rotate property when you create the matrix.
Resolving ticket as "Won't fix" as MobileWeb has been deprecated.