{ "id": "84199", "key": "TIMOB-6843", "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": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-06-26T22:10:05.000+0000", "created": "2011-12-22T08:20:17.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core", "parity" ], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [ { "id": "27346", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "112214", "key": "TIMOB-13377", "fields": { "summary": "Ti API: Design a new key-frame based animation system", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-08-24T20:50:59.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" }, { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "h3. The Problem\r\nWhen using {{2DMatrix.rotate()}} to rotate views, this function can take 2 arguments on Android, and only one on iOS and Mobile Web. In the source code found here:\r\n\r\n[https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/view/Ti2DMatrix.java#L140-152|https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/view/Ti2DMatrix.java#L140-152]\r\n\r\nWe see that Android takes 2 arguments because in the single argument form it resets the rotation transform back to zero instead of using its existing transformation. While this gives Android developers a chance to better control their animations, it creates a parity issue. For exmaple:\r\n\r\n{code}\r\nTi.UI.create2DMatrix().rotate(45, 0);\r\n{code}\r\n\r\nif animated on a view will rotate it from 45 to 0 on Android, but it will rotate it from its existing position to 45 on iOS. There will be no errors as iOS will just ignore the 2nd argument, but it will behave differently on each platform.\r\n\r\nh3. Proposed Solutions\r\n\r\n1. Modify the Android source to use any existing transform for its original position instead of just reseting it to zero.\r\n2. Modify the iOS source so that it can also accept a starting and ending rotation for the {{rotate()}} function", "attachment": [], "flagged": false, "summary": "Ti API: 2DMatrix.rotate() can take 2 arguments on Android, only 1 on iOS and Mobile Web", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK version: 1.8.0.1 RC3\r\nJavascript Engine: Rhino & V8 \r\nPlatform & version: iOS 4.0+, Android 2.2+\r\nDevice Details: iOS simulator, Android emulator\r\nHost Operating System: OSX 10.7.2\r\nTitanium Studio version: 1.0.7.201112132151", "comment": { "comments": [ { "id": "236481", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FYI 2DMatrix.rotate only takes one argument on Mobile Web", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-29T19:47:50.000+0000", "updated": "2013-01-29T19:47:50.000+0000" }, { "id": "245796", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As it turns out, this is an amazingly difficult problem to solve because matrices in Android are not true affine transforms (they have some extra sauce applied). This means that achieving parity in rotate is surprisingly difficult. The better solution is to just wait until we create a new, non-matrix based animation system.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T21:02:16.000+0000", "updated": "2013-04-04T21:02:16.000+0000" }, { "id": "427203", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Mobile Web has been deprecated and will be removed in fixVersion 7.0.0.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-08-24T20:50:59.000+0000", "updated": "2017-08-24T20:50:59.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }