{ "id": "84899", "key": "TIMOB-7190", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": null, "resolutiondate": null, "created": "2012-01-15T14:09:24.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "animation", "dr-list", "improvement", "pathmenu" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-04-13T20:09:52.000+0000", "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" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "Currently there is no way to know what view a {{Ti.UI.Animation}} is operating on. So for example, if I want to perform another operation on the target view after the {{Animation}} completes, I need to add that reference directly to the {{Animation}} manually.\r\n\r\n{code}\r\nvar view = Ti.UI.createView(/* set view properties */);\r\nvar animation = Ti.UI.createAnimation({\r\n duration: 1000,\r\n top: 100,\r\n // I need to add this manually so that I know what view was animated in the upcoming 'complete' event\r\n view: view\r\n});\r\nanimation.addEventListener('complete', function(e) {\r\n // There is no native property in Ti.UI.Aniamtion, nor the returned event object, that \r\n // gives me access to the view being animated. Until this property is added, I'll have to \r\n // use the property I added manually.\r\n e.source.view.backgroundColor = '#f00';\r\n});\r\nview.animate(animation);\r\n{code}\r\n\r\nIt would be much easier if when {{view.animate()}} was called, the {{Animate}} object automatically had the appropriate view added to it as a property.", "attachment": [], "flagged": false, "summary": "Add 'view' property to Ti.UI.Animation", "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\r\nHost Operating System: OSX 10.7.2\r\nTitanium Studio version: 1.0.7.201112132151", "comment": { "comments": [ { "id": "179333", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I don't think this is necessary since the complete event is passed a \"source\" which would be the view that was animated.\r\n\r\nHere's the API docs: http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Animation.complete-event.html", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-01-15T17:38:27.000+0000", "updated": "2012-01-15T17:38:27.000+0000" }, { "id": "179335", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In my testing on iOS and Android, {{e.source}} returns the {{Ti.UI.Animation}}, not the view that is animating.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-15T19:43:02.000+0000", "updated": "2012-01-15T19:43:02.000+0000" }, { "id": "179341", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Sorry, you're right. That is how it will be in mobile web too.\r\n\r\nPerhaps this ticket should be to add a \"target\" to the Ti.UI.Animation start/complete events that would be the UI element being animated.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-01-15T23:23:48.000+0000", "updated": "2012-01-15T23:23:48.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }