{ "id": "63084", "key": "TIMOB-2452", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-03-19T16:34:38.000+0000", "created": "2011-04-15T03:20:13.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "anchor", "android", "look1", "parity", "point" ], "versions": [], "issuelinks": [ { "id": "15821", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "88205", "key": "TIDOC-462", "fields": { "summary": "APIDoc: Document Android-only Animation.anchorPoint", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T22:27:29.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": "{html}

I can get an image to rotate around its top-left corner.\r\nSupposedly, by setting an anchorPoint on the image I should be able\r\nto rotate around another point also. I cannot. It rotates around\r\nthe top-left.

\r\n

Info & code, see:
\r\nhttp://developer.appcelerator.com/helpdesk/view/57431
\r\n\r\nhttp://developer.appcelerator.com/question/84171/rotate-an-image-ar...

\r\n

Using SDK 1.5, timestamp=11/23/10 14:42, githash=df00caa with\r\nAndroid SDK 1.6.

\r\n

Perhaps also related to \r\nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/839-i...

\r\n

Thanks,
\r\nTim

{html}", "attachment": [], "flagged": false, "summary": "Android: Image rotates around top-left not anchor point", "creator": { "name": "skypanther1", "key": "skypanther1", "displayName": "skypanther", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "skypanther1", "key": "skypanther1", "displayName": "skypanther", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128511", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Assigning to Don for triage.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:13.000+0000", "updated": "2011-04-15T03:20:13.000+0000" }, { "id": "128512", "author": { "name": "brianyamabe", "key": "brianyamabe", "displayName": "Brian Yamabe", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Similar to this, the anchorPoint is not honored when animating a\nlabel. A full description with sample code is here: \nhttp://developer.appcelerator.com/question/117455/anchorpoint-not-w...

{html}", "updateAuthor": { "name": "brianyamabe", "key": "brianyamabe", "displayName": "Brian Yamabe", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:14.000+0000", "updated": "2011-04-15T03:20:14.000+0000" }, { "id": "185781", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "h6.Issue\r\nAnchor point - Titanium.UI.View.anchorPoint - it's currently supported in iOS only.\r\n\r\nh6.Documentation\r\nhttp://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.View.anchorPoint-property.html\r\n\r\nh6.Repro sequence\r\n{code:title=app.js}\r\nvar win = Titanium.UI.createWindow();\r\n\r\n//\r\n// REUSABLE ANIMATION WITH TRANSFORM\r\n//\r\nvar t = Ti.UI.create2DMatrix();\r\nt = t.rotate(90);\r\n\r\nvar a = Titanium.UI.createAnimation();\r\na.transform = t;\r\na.duration = 1000;\r\na.autoreverse = true;\r\n\r\n//\r\n// TOP LEFT\r\n//\r\nvar view1 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:10,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:0,y:0}\r\n});\r\nwin.add(view1);\r\n\r\nvar topLeft = Titanium.UI.createButton({\r\n\ttitle:'Top Left',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:10,\r\n\tleft:10\r\n});\r\n\r\ntopLeft.addEventListener('click', function()\r\n{\r\n\tview1.animate(a);\r\n});\r\n\r\nwin.add(topLeft);\r\n\r\n//\r\n// TOP RIGHT\r\n//\r\nvar view2 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:80,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:1,y:0}\r\n});\r\nwin.add(view2);\r\n\r\nvar topRight = Titanium.UI.createButton({\r\n\ttitle:'Top Right',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:80,\r\n\tleft:10\r\n});\r\n\r\ntopRight.addEventListener('click', function()\r\n{\r\n\tview2.animate(a);\r\n});\r\n\r\nwin.add(topRight);\r\n\r\n//\r\n// BOTTOM LEFT\r\n//\r\nvar view3 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:150,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:0,y:1}\r\n});\r\nwin.add(view3);\r\n\r\nvar bottomLeft = Titanium.UI.createButton({\r\n\ttitle:'Bottom Left',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:150,\r\n\tleft:10\r\n});\r\n\r\nbottomLeft.addEventListener('click', function()\r\n{\r\n\tview3.animate(a);\r\n});\r\n\r\nwin.add(bottomLeft);\r\n\r\n//\r\n// BOTTOM RIGHT\r\n//\r\nvar view4 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:220,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:1,y:1}\r\n});\r\nwin.add(view4);\r\nvar bottomRight = Titanium.UI.createButton({\r\n\ttitle:'Bottom Right',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:220,\r\n\tleft:10\r\n});\r\n\r\nbottomRight.addEventListener('click', function()\r\n{\r\n\tview4.animate(a);\t\r\n});\r\n\r\nwin.add(bottomRight);\r\n\r\n//\r\n// CENTER\r\n//\r\nvar view5 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:290,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:0.5,y:0.5}\r\n});\r\nwin.add(view5);\r\n\r\nvar center = Titanium.UI.createButton({\r\n\ttitle:'Center',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:290,\r\n\tleft:10\r\n});\r\n\r\ncenter.addEventListener('click', function()\r\n{\r\n\tview5.animate(a);\r\n});\r\n\r\nwin.add(center);\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-09T10:51:12.000+0000", "updated": "2012-03-09T10:51:12.000+0000" }, { "id": "187187", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Testing Steps:\r\n1. Run this code for Android:\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\n\r\n//\r\n// REUSABLE ANIMATION WITH TRANSFORM\r\n//\r\nvar t = Ti.UI.create2DMatrix();\r\nt = t.rotate(90);\r\n\r\n\r\n//\r\n// TOP LEFT\r\n//\r\nvar view1 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:10,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50\r\n});\r\nwin.add(view1);\r\n\r\nvar topLeft = Titanium.UI.createButton({\r\n\ttitle:'Top Left',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:10,\r\n\tleft:10\r\n});\r\n\r\ntopLeft.addEventListener('click', function()\r\n{\r\n\tview1.animate({\r\n transform:t, \r\n duration: 1000, \r\n anchorPoint: {x:0, y:0}\r\n });\r\n});\r\n\r\nwin.add(topLeft);\r\n\r\n//\r\n// TOP RIGHT\r\n//\r\nvar view2 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:80,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50\r\n});\r\nwin.add(view2);\r\n\r\nvar topRight = Titanium.UI.createButton({\r\n\ttitle:'Top Right',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:80,\r\n\tleft:10\r\n});\r\n\r\ntopRight.addEventListener('click', function()\r\n{\r\n\tview2.animate({\r\n transform:t, \r\n duration: 1000, \r\n anchorPoint: {x:1, y:0}\r\n });\r\n});\r\n\r\nwin.add(topRight);\r\n\r\n//\r\n// BOTTOM LEFT\r\n//\r\nvar view3 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:150,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50\r\n});\r\nwin.add(view3);\r\n\r\nvar bottomLeft = Titanium.UI.createButton({\r\n\ttitle:'Bottom Left',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:150,\r\n\tleft:10\r\n});\r\n\r\nbottomLeft.addEventListener('click', function()\r\n{\r\n\tview3.animate({\r\n transform:t, \r\n duration: 1000, \r\n anchorPoint: {x:0, y:1}\r\n });\r\n});\r\n\r\nwin.add(bottomLeft);\r\n\r\n//\r\n// BOTTOM RIGHT\r\n//\r\nvar view4 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:220,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50\r\n});\r\nwin.add(view4);\r\nvar bottomRight = Titanium.UI.createButton({\r\n\ttitle:'Bottom Right',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:220,\r\n\tleft:10\r\n});\r\n\r\nbottomRight.addEventListener('click', function()\r\n{\r\nview4.animate({\r\n transform:t, \r\n duration: 1000, \r\n anchorPoint: {x:1, y:1}\r\n });\r\n});\r\n\r\nwin.add(bottomRight);\r\n\r\n//\r\n// CENTER\r\n//\r\nvar view5 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:290,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50\r\n});\r\nwin.add(view5);\r\n\r\nvar center = Titanium.UI.createButton({\r\n\ttitle:'Center',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:290,\r\n\tleft:10\r\n});\r\n\r\ncenter.addEventListener('click', function()\r\n{\r\n\tview5.animate({\r\n transform:t, \r\n duration: 1000, \r\n anchorPoint: {x:0.5, y:0.5}\r\n });\r\n});\r\n\r\nwin.add(center);\r\n\r\nwin.open();\r\n{code}\r\n\r\n2.Simultaneously, run this code in iOS:\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\n\r\n//\r\n// REUSABLE ANIMATION WITH TRANSFORM\r\n//\r\nvar t = Ti.UI.create2DMatrix();\r\nt = t.rotate(90);\r\n\r\nvar a = Titanium.UI.createAnimation();\r\na.transform = t;\r\na.duration = 1000;\r\n//a.autoreverse = true;\r\n\r\n//\r\n// TOP LEFT\r\n//\r\nvar view1 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:10,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:0,y:0}\r\n});\r\nwin.add(view1);\r\n\r\nvar topLeft = Titanium.UI.createButton({\r\n\ttitle:'Top Left',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:10,\r\n\tleft:10\r\n});\r\n\r\ntopLeft.addEventListener('click', function()\r\n{\r\n\tview1.animate(a);\r\n});\r\n\r\nwin.add(topLeft);\r\n\r\n//\r\n// TOP RIGHT\r\n//\r\nvar view2 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:80,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:1,y:0}\r\n});\r\nwin.add(view2);\r\n\r\nvar topRight = Titanium.UI.createButton({\r\n\ttitle:'Top Right',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:80,\r\n\tleft:10\r\n});\r\n\r\ntopRight.addEventListener('click', function()\r\n{\r\n\tview2.animate(a);\r\n});\r\n\r\nwin.add(topRight);\r\n\r\n//\r\n// BOTTOM LEFT\r\n//\r\nvar view3 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:150,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:0,y:1}\r\n});\r\nwin.add(view3);\r\n\r\nvar bottomLeft = Titanium.UI.createButton({\r\n\ttitle:'Bottom Left',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:150,\r\n\tleft:10\r\n});\r\n\r\nbottomLeft.addEventListener('click', function()\r\n{\r\n\tview3.animate(a);\r\n});\r\n\r\nwin.add(bottomLeft);\r\n\r\n//\r\n// BOTTOM RIGHT\r\n//\r\nvar view4 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:220,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:1,y:1}\r\n});\r\nwin.add(view4);\r\nvar bottomRight = Titanium.UI.createButton({\r\n\ttitle:'Bottom Right',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:220,\r\n\tleft:10\r\n});\r\n\r\nbottomRight.addEventListener('click', function()\r\n{\r\n\tview4.animate(a);\t\r\n});\r\n\r\nwin.add(bottomRight);\r\n\r\n//\r\n// CENTER\r\n//\r\nvar view5 = Titanium.UI.createView({\r\n\tbackgroundColor:'#336699',\r\n\ttop:290,\r\n\tleft:220,\r\n\theight:50,\r\n\twidth:50,\r\n\tanchorPoint:{x:0.5,y:0.5}\r\n});\r\nwin.add(view5);\r\n\r\nvar center = Titanium.UI.createButton({\r\n\ttitle:'Center',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:290,\r\n\tleft:10\r\n});\r\n\r\ncenter.addEventListener('click', function()\r\n{\r\n\tview5.animate(a);\r\n});\r\n\r\nwin.add(center);\r\n\r\nwin.open();\r\n{code}\r\n\r\n3. Check behavior on both iOS/Android. ", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T14:07:29.000+0000", "updated": "2012-03-19T14:07:29.000+0000" }, { "id": "187264", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note that the PR sent for this bug ( https://github.com/appcelerator/titanium_mobile/pull/1746) fixes a conversion issue for a workaround of the underlying problem. This is b/c we don't plan to support anchorPoint property for view anytime soon. Marking this bug as invalid.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T16:33:44.000+0000", "updated": "2012-03-19T16:34:04.000+0000" }, { "id": "187267", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note that this functionality is documented as iOS only and we don't intend to support it on Android.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T16:36:00.000+0000", "updated": "2012-03-19T16:36:00.000+0000" }, { "id": "413349", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T22:27:29.000+0000", "updated": "2017-03-16T22:27:29.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }