{ "id": "79666", "key": "AC-3138", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2011-10-20T12:38:12.000+0000", "created": "2011-08-26T02:03:42.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "updated": "2016-03-08T07:48:12.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When launch an animation of a view than (for example) modify the 'top' property and use this property to calculate the next position of the view, the 'top' value is only valid at first time:\r\n\r\nmyButton.addEventListener(\"click\", function () {\r\n myView.animate({\r\n top: myView.top + 10\r\n });\r\n});\r\n\r\nIf the line 'top: myView.top + 10' is replaced with 'top: Math.random() * 10', view animation runs ok.\r\n\r\nThe bug is that 'animate' method don't update the 'top' property of the view after first complete animation.", "attachment": [], "flagged": false, "summary": "View properties not updated after animation", "creator": { "name": "singulartouch", "key": "singulartouch", "displayName": "Javier Pascual Soriano", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "singulartouch", "key": "singulartouch", "displayName": "Javier Pascual Soriano", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Macbook Pro, SDK 1.7.2, Titanium Studio 1.2, iOS SDK 5.0 beta 6", "comment": { "comments": [ { "id": "169890", "author": { "name": "adecena", "key": "adecena", "displayName": "Anthony Decena", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you for raising this ticket. If this is still an issue, then we need all the information listed in the [Jira Ticket Checklist|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist] in order to accept a ticket.\r\n\r\nIn this case, we need a complete code example showing the issue.\r\n\r\nThank you.", "updateAuthor": { "name": "adecena", "key": "adecena", "displayName": "Anthony Decena", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T12:38:03.000+0000", "updated": "2011-10-20T12:38:03.000+0000" }, { "id": "170870", "author": { "name": "tamara", "key": "tamara", "displayName": "Tamara Bernad", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi, I am having the same issue. I see this ticket is already closed, but not solved because of lack of information.\r\n\r\nI am attaching here a code that can be use to see what is happening. Just two buttons and one box, when you click on button 1, the box animates to a position and on click on the second button the box resets its position to current top & left. On reset of the position the box should stay where it is, but it gets back to initial position, so the position values are not getting updated on the animation.\r\n\r\nThe following code should work by just paste & compile:\r\n\r\n----------------- CODE -----------------\r\n\r\nvar platformWidth = Ti.Platform.displayCaps.platformWidth;\r\nvar platformHeight = Ti.Platform.displayCaps.platformHeight;\r\nvar win = Ti.UI.createWindow({\r\n\tmodal : true,\r\n\tbackgroundColor : '#000',\r\n\tlayout : 'absolute',\r\n\tnavBarHidden : true\r\n});\r\nvar b1 = Titanium.UI.createButton({\r\n\ttitle : 'Click to animate',\r\n\twidth : 200,\r\n\theight : 30,\r\n\ttop : 10,\r\n\tleft : 10\r\n});\r\nvar b2 = Titanium.UI.createButton({\r\n\ttitle : 'Click to reposition',\r\n\twidth : 200,\r\n\theight : 30,\r\n\ttop : b1.height + b1.top + 10,\r\n\tleft : 10\r\n});\r\nvar box = Ti.UI.createView({\r\n\twidth : 100,\r\n\theight : 30,\r\n\tbackgroundColor : \"#ff00ff\",\r\n\ttop : b2.top + b2.height + 20,\r\n\tleft : b1.left\r\n});\r\nwin.add(b1);\r\nwin.add(b2);\r\nwin.add(box);\r\nb1.addEventListener('click', function(e) {\r\n\tbox.animate({\r\n\t\tduration : 500,\r\n\t\tleft : platformWidth - box.width,\r\n\t\ttop : platformHeight - box.height - 30\r\n\t});\r\n});\r\n\r\nb2.addEventListener('click', function(e) {\r\n\tbox.left = box.left;\r\n\tbox.top = box.top;\r\n});\r\nwin.open();\r\n\r\n\r\n----------------------------------------------------\r\n\r\nI am running:\r\n\r\nTitanium SDK version:1.7.3\r\nPlatform & version: iOS 4.3\r\nDevice Details: iOS simulator\r\nHost Operating System: OSX 10.6.7\r\nTitanium Studio version: 1.0.6.201110251616\r\n\r\nI hope this info helps, please let me know if this is enough or if I need to open a new ticket for this issue.\r\n\r\nThank you.\r\n", "updateAuthor": { "name": "tamara", "key": "tamara", "displayName": "Tamara Bernad", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-31T04:33:38.000+0000", "updated": "2011-10-31T04:33:38.000+0000" }, { "id": "183538", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Closing due to inactivity. If this issue still exists, please raise a new ticket, including all the information in the [JIRA Ticket Checklist|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist] to ensure that we can escalate it quickly. Read [How to Submit a Bug Report|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report] if you have not read it before, and always start a ticket using the [JIRA Ticket Template|https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template].\r\n\r\nThanks in advance", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-17T02:23:03.000+0000", "updated": "2012-02-17T02:23:03.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }