{ "id": "159559", "key": "TIMOB-23209", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-06-30T07:15:00.000+0000", "created": "2016-04-13T22:25:02.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-5.3.0", "qe-5.4.0" ], "versions": [ { "id": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "issuelinks": [ { "id": "51945", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "146324", "key": "TIMOB-18750", "fields": { "summary": "Windows: Support animations of right, center and bottom properties", "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": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "51337", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "155054", "key": "TIMOB-20598", "fields": { "summary": "Windows: views not animating correctly", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-06-30T16:57:57.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h2. Description\r\nUsing a sample app that animates a view's position on press, subsequent presses during an animation are not handled properly. each press seems to initiate the animation sequence on the same view from the current position, at the same time of the original animation. This is handled differently with iOS, in which a warning message is returned to the console for any additional presses of the view during an animation:\r\n{code:java}\r\n[WARN] : New layout set while view [object TiUIView] animating: Will relayout after animation.\r\n{code}\r\n\r\nA suggestion regarding this issue would be to achieve parity with iOS.\r\n\r\nh2. Steps to Reproduce\r\n1. Create a classic mobile project on *Windows*\r\n2. replace app.js with following sample code: \r\n{code:java}\r\nvar win = Ti.UI.createWindow({backgroundColor:'green'});\r\nvar box = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n left: 100,\r\n height: '100',\r\n width: '100'\r\n});\r\n\r\nvar pin1 = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n left: 150,\r\n height: '140',\r\n width: '6'\r\n});\r\nvar pin2 = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n left: 200,\r\n height: '140',\r\n width: '6'\r\n});\r\nvar pin3 = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n left: 250,\r\n height: '140',\r\n width: '6'\r\n});\r\nwin.add(pin1);\r\nwin.add(pin2);\r\nwin.add(pin3);\r\n\r\nwin.add(box);\r\nvar pos = 100;\r\nbox.addEventListener('click', function () {\r\n pos += 50;\r\n var a = Ti.UI.createAnimation({\r\n left: pos,\r\n duration: 2000,\r\n });\r\n box.animate(a);\r\n});\r\nwin.open();\r\n{code}\r\n3. Build to Windows Phone device / emulator 10.0\r\n4. Launch app\r\n5. Press the red view, and press repeatedly as the animation is occurring.\r\n\r\nh2. Expected Result\r\nsubsequent presses of the element should not initiate additional animations at the same time, and should be ignored. \r\n\r\nh2. Actual Result\r\nsubsequent presses of the element initiates additional animations to the same view, at the same time. ", "attachment": [], "flagged": false, "summary": "Windows: Improve handling of view animations on multiple presses", "creator": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "environment": "Tested on: \r\nWindows 10 Home & Pro \r\nWindows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE) \r\nAppc Studio: 4.6.0.201604081249 \r\nTi SDK: 5.3.0.v20160413061223 \r\nAppc NPM: 4.2.5-1 \r\nAppc Core: 5.3.0-12 \r\nNode: v4.4.2", "closedSprints": [ { "id": 631, "state": "closed", "name": "2016 Sprint 11 SDK", "startDate": "2016-05-21T00:06:10.029Z", "endDate": "2016-06-04T00:06:00.000Z", "completeDate": "2016-06-06T07:30:39.854Z", "originBoardId": 114 }, { "id": 649, "state": "closed", "name": "2016 Sprint 13 SDK", "startDate": "2016-06-18T00:25:17.303Z", "endDate": "2016-07-02T00:25:00.000Z", "completeDate": "2016-07-04T04:25:16.889Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "387406", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/731", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-06-02T08:47:22.000+0000", "updated": "2016-06-02T08:47:22.000+0000" }, { "id": "389490", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Tested this ticket with the latest components. When applying multiple presses during a view animation, the following message is now returned to the console log: \r\n{code:java}\r\n[WARN] : New layout set while view animating\r\n{code}\r\nOn the first animation, multiple presses during the event won't initiate subsequent animations at the same time. However depending on how many presses were made, the second animation moves further than intended (Instead of moving +50 pxs, it moves an extra +50 for each press registered).\r\n\r\nTest Case:\r\n1. Use the same demo code and project.\r\n2. Click on View multiple times as it runs through its first animation.\r\n3. Once the view has completed its first animation, press the view again *ONCE.*\r\n4. Observe the distance that the second animation travels is proportionate to (Number of Clicks * 50px)\r\n\r\nExpected Result:\r\n\r\nRegardless of how many presses, each subsequent animation should travel 50px each time.\r\n\r\n*Reopening ticket*, as this issue should be addressed to improve the handling of view animations on multiple presses.\r\n\r\nTested on: \r\nWindows 10 Pro \r\nWindows Phone 10.0 (Microsoft Lumia 640 LTE) \r\nAppc Studio: 4.7.0.201606220541\r\nTi SDK: 5.4.0.v20160627224205\r\nAppc NPM: 4.2.7-2\r\nAppc Core: 5.4.0-20\r\nNode: v4.4.4", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-06-29T23:52:41.000+0000", "updated": "2016-06-29T23:53:52.000+0000" }, { "id": "389546", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~htbryant] I think that the actual issue was due to the test code itself. In that example above, because the variable {{pos}} is increased every time {{click}} event is fired...that makes you feel view travels way far than expected. So I would suggest testing a safer code like below, to make sure to increase destination only after animation is finished.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'green' });\r\nvar box = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n left: 100,\r\n height: '100',\r\n width: '100'\r\n});\r\n\r\nvar pin1 = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n left: 150,\r\n height: '140',\r\n width: '6'\r\n});\r\nvar pin2 = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n left: 200,\r\n height: '140',\r\n width: '6'\r\n});\r\nvar pin3 = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n left: 250,\r\n height: '140',\r\n width: '6'\r\n});\r\n\r\nwin.add(pin1);\r\nwin.add(pin2);\r\nwin.add(pin3);\r\nwin.add(box);\r\n\r\nvar pos = 150;\r\nbox.addEventListener('click', function () {\r\n var a = Ti.UI.createAnimation({\r\n left: pos,\r\n duration: 2000,\r\n });\r\n a.addEventListener('complete', function () {\r\n pos += 50;\r\n });\r\n box.animate(a);\r\n});\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-06-30T07:15:00.000+0000", "updated": "2016-06-30T07:15:00.000+0000" }, { "id": "389593", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~kota] Thank you for providing the safer test code. I can verify that with the 'complete' event set to handle the positioning value, the element does not travel farther than expected on multiple presses.\r\n\r\nTested on: \r\nWindows 10 Pro \r\nWindows Phone 10.0 (Microsoft Lumia 640 LTE) \r\nAppc Studio: 4.7.0.201606220541\r\nTi SDK: 5.4.0.v20160627224205\r\nAppc NPM: 4.2.7-2\r\nAppc Core: 5.4.0-20\r\nNode: v4.4.4\r\n\r\n*Closing Ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-06-30T16:57:54.000+0000", "updated": "2016-06-30T16:57:54.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }