{ "id": "85594", "key": "TIMOB-7440", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15487", "description": "2013 Sprint 10 Core", "name": "2013 Sprint 10 Core", "archived": true, "released": true, "releaseDate": "2013-05-20" }, { "id": "15108", "description": "2013 Sprint 10", "name": "2013 Sprint 10", "archived": true, "released": true, "releaseDate": "2013-05-20" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-05-10T04:36:41.000+0000", "created": "2012-01-26T17:39:21.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_animation", "parity", "qe-manualtest", "tbs-2.1.0" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-08T00:34:15.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Both Android and iOS appear to accept the same initializer to {{create2DMatrix}}. This dictionary object can contain {{scale}} and {{rotate}} properties, like so:\r\n\r\n{code}\r\nvar m = Ti.UI.create2DMatrix({ \r\n scale: 2,\r\n rotate: 45\r\n);\r\n{code}\r\n\r\nApplying this matrix to a view on iOS produces the expected results: the view is scaled 2x and rotated 45 degrees. However, on Android the view is scaled 2x and translated, but not rotated.\r\n\r\nUsing either {{scale:}} or {{rotate:}} on its own works on both systems.\r\n\r\nThe following code produces the correct results on Android:\r\n\r\n{code}\r\nvar m = Ti.UI.create2DMatrix({ \r\n rotate: 45\r\n);\r\nm = m.scale(2, 2);\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: 2DMatrix initalizer doesn't work properly when both \"scale\" and \"rotate\" are specified", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "243125", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem reproduces with release 3.0.2 and master release 3.1.0\r\n\r\ntested on\r\n\r\nTitanium Studio, build: 3.0.2.201302191606\r\nTitanium SDK version: 3.1.0 \r\nTitanium SDK version: 3.0.2 \r\nDevice: Samsung galaxy s duos Android version: 4.0.4\r\nAndroid Emulator: Android SDK version: 2.2\r\niOS iPhone Simulator: iOS SDK version: 6.0\r\n\r\nIt works fine on IOS iphone simulator", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-20T09:02:35.000+0000", "updated": "2013-03-20T09:02:59.000+0000" }, { "id": "251190", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "h3. Test case / fail case\r\n\r\nRun an app with this app.js:\r\n\r\n{code:title=app.js}\r\nTi.UI.backgroundColor = \"blue\";\r\nvar win = Titanium.UI.createWindow({ \r\n\t\ttitle:'Test',\r\n\t\tbackgroundColor:'blue',\r\n\t\texitOnClose: true,\r\n\t\torientationModes: [Ti.UI.PORTRAIT]\r\n\t}),\r\n\tbtn = Ti.UI.createButton({\r\n\t\ttitle: \"Rotate/Scale\",\r\n\t\theight: 48, top: \"40%\", left: \"25%\", width: 150\r\n\t});\r\n\r\nwin.add(btn);\r\n\r\nbtn.addEventListener(\"click\", function() {\r\n\t/** THIS IS THE CODE FROM THE TICKET **/\r\n\tvar matrix = Ti.UI.create2DMatrix({\r\n\t\tscale: 2,\r\n\t\trotate: 45\r\n\t});\r\n\t/*************************************/\r\n\r\n\tbtn.animate({\r\n\t\ttransform: matrix,\r\n\t\tduration: 500\r\n\t});\r\n});\r\n\r\nwin.add(Ti.UI.createLabel({\r\n\ttext: \"When clicked once, the button should double size AND rotate 45°. Fail case is just doubling size and failing to rotate.\",\r\n\tbottom: 16, left: 16, right: 16, height: \"auto\",\r\n\tcolor: \"white\"\r\n}));\r\n\r\nwin.open();\r\n{code}\r\n\r\nWhen you click the button, it should *both* scale up (grow) *and* rotate 45°. The fail case was that it would scale up but *not* rotate.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-09T23:39:13.000+0000", "updated": "2013-05-09T23:45:55.000+0000" }, { "id": "251193", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR ready: https://github.com/appcelerator/titanium_mobile/pull/4247", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-09T23:46:14.000+0000", "updated": "2013-05-09T23:46:14.000+0000" }, { "id": "276392", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified using Bill's test case that the button both scale up and rotate 45°.\n\nTested on:\n\nTitanium Studio, build: 3.2.0.201310230548\nOS: Mac OS X Mountain Lion (10.8.5)\nSDK build: 3.2.0.v20131022171645\nTi CLI: 3.2.0 (72f7426b4ee6c2d2883c666d5b7e03906a16012f)\nDevices: Samsung Galaxy S3 (4.0.4), Samsung Galaxy S4 (4.2.2)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T18:33:25.000+0000", "updated": "2013-10-23T18:33:25.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }