{ "id": "92030", "key": "TIMOB-9177", "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": [ { "id": "13502", "description": "Sprint 2012-14 Core", "name": "Sprint 2012-14 Core", "archived": true, "released": true, "releaseDate": "2012-07-15" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-12-21T05:36:59.000+0000", "created": "2012-05-19T17:45:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2012-12-21T05:36: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" } ], "description": "Apparently, the only way to stop an animation is to call animate() without any arguments.", "attachment": [ { "id": "29803", "filename": "app.js", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-07-16T11:45:28.000+0000", "size": 2469, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "MobileWeb: Update animate() to cancel animations", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "197842", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{{view.animate()}} causes an exception in Android, whereas...\r\n\r\n{code}\r\nview.animate({});\r\n{code}\r\n\r\ncancels the animation. Haven't tried iOS.\r\n\r\nI wonder if we should all just agree on a View.cancelAnimation() to get in before 2.1? (or later perhaps if we're all booked-up for 2.1)", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-06-08T07:20:21.000+0000", "updated": "2012-06-08T07:20:21.000+0000" }, { "id": "197862", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I full plan on implementing cancel/pause functionality internally for 2.1. I was going to wait on how we should expose it until A) I figured out how I'm going to handle it and B) what everybody thought the API should look like.\r\n\r\nI disagree with a cancelAnimation() function. I think we should go down the road of animate() returning a canceller function or handle or something, but I haven't quite formed a solution worth recommending.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-06-08T10:12:25.000+0000", "updated": "2012-06-08T10:12:25.000+0000" }, { "id": "207756", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/2576", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-07-16T11:42:54.000+0000", "updated": "2012-07-16T11:42:54.000+0000" }, { "id": "211071", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified.Thus closing.\r\n\r\nTested On:\r\nTitanium studio : 2.1.1.201207271312\r\nSDK version : 2.2.0.v20120731184111\r\nAndroid 4.0.4\r\nIphone 5.0.1", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-01T13:37:01.000+0000", "updated": "2012-08-01T13:37:01.000+0000" }, { "id": "213392", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "@Chris: The PR is huge,so forgive me for asking rather than skimming code: did you implement some way to cancel an animation? I can't find any documentation anywhere, if so. I'm working on a community PR https://github.com/appcelerator/titanium_mobile/pull/2661 and Neeraj asked me to check with you about animation cancellation in MobileWeb.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-08T14:24:33.000+0000", "updated": "2012-08-08T14:24:33.000+0000" }, { "id": "213395", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "to be clear, I meant a way for Titanium devs to cancel (i.e., not necessarily just internal code, which obviously wouldn't necessitate a change to the .yml files.)", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-08T14:27:56.000+0000", "updated": "2012-08-08T14:27:56.000+0000" }, { "id": "213404", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Yes, you can cancel an animation in Mobile Web. The view.animate() function returns a modified promise object.\r\n\r\nHere's what the object returned by animate() should look like:\r\n\r\nPromise then(Function successCallback, Function errorCallback) // where promise.then() === promise. then() is used to be notified when the animation completes\r\n\r\nvoid resolve(...) // all arguments are considered the \"result\" and forwarded to all successCallbacks(). not intended to be called by user's app\r\n\r\nvoid reject(Error|String ex) // if ex is a string, convert it to an Error. in context of an animate() response, this method is not intended to be called by user's app\r\n\r\nBoolean pause() // returns true if success, otherwise false (for when the animation is already paused)\r\n\r\nBoolean resume() // returns true if success, otherwise false (for when the animation is already playing)\r\n\r\nBoolean cancel(Boolean reset) // returns true if success, otherwise false (for when animation is finished and no longer exists). reset argument restores animated view to original state", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-08-08T14:42:03.000+0000", "updated": "2012-08-08T14:42:03.000+0000" }, { "id": "213406", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Continued...\r\n\r\nProperties:\r\n\r\nsource (Ti.UI.View)\r\n\r\nanimation (Ti.UI.Animation) // if animate() is called with an Object, the Object is promoted to a Ti.UI.Animation object\r\n\r\nNone of those functions above are documented. Was intending to create a formal spec before documenting public access.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-08-08T14:45:35.000+0000", "updated": "2012-08-08T14:45:35.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }