{ "id": "130268", "key": "AC-1345", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-05-19T05:22:43.000+0000", "created": "2014-05-11T21:46:45.000+0000", "labels": [ "anchorpoint", "android", "transform" ], "versions": [], "issuelinks": [ { "id": "37694", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "127148", "key": "TIMOB-16596", "fields": { "summary": "Android: Animation anchorPoints not working", "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": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:45.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "If you apply a transformation with a desired anchorPoint, on a that doesn't have it's width and height properties set programatically or the width and height are set to Ti.UI.SIZE and the transform is set before the image, the anchorpoint doesn´t recalculate and even if the width or height changes, the anchor point stays it was.\r\n\r\nFor example, for an ImageView that has it's image set programatically, the width and height changes based on the size of the image, but the anchor point works as if it's size still were 0,0, making it look like it's being rotated from the top left corner, even when anchorpoint is set at 0.5,0.5\r\n\r\nIn short: Only works and recalculates correctly if Ti.UI.FILL or a fixed height is set.\r\n\r\nCode to reproduce on Android:\r\n\r\nView:\r\n{code:xml|title=view.xml|borderStyle=solid}\r\n\r\n\t\t\t\r\n\r\n{code}\r\n\r\nController:\r\n{code:javascript|title=controller.js|borderStyle=solid}\r\nTitanium.Media.openPhotoGallery(\r\n{\r\n success:function(event)\r\n { \t\t\r\n if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO)\r\n { \r\n var image= event.media;\r\n var transform = Ti.UI.create2DMatrix({ anchorPoint: {x: 0.5, y: 0.5}}).rotate(90);\r\n $.imgProfilePicture.transform = transform;\r\n $.imgProfilePicture.image = image;\r\n }\r\n else\r\n {\r\n alert('Only pictures can be taken');\r\n return;\r\n }\r\n }\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "Anchor Point, doesn´t recalculate when transform is set before the image.", "creator": { "name": "juanu", "key": "juanu", "displayName": "Juan Manuel", "active": true, "timeZone": "America/Argentina/Buenos_Aires" }, "subtasks": [], "reporter": { "name": "juanu", "key": "juanu", "displayName": "Juan Manuel", "active": true, "timeZone": "America/Argentina/Buenos_Aires" }, "environment": "Android", "comment": { "comments": [ { "id": "304820", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving this ticket as a duplicate of TIMOB-16596. Please track that ticket for further updates.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-14T18:31:58.000+0000", "updated": "2014-05-19T05:22:22.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }