{ "id": "150397", "key": "TIMOB-19351", "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": "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-02T14:28:24.000+0000", "created": "2015-08-13T21:11:00.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.4.0" ], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [ { "id": "51438", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "159717", "key": "TIMOB-23243", "fields": { "summary": "Windows: Ti.UI.createAnimation does not support % in the width property", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-06-29T21:09:30.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": "Our animation code assumes pixels for units, regardless of whether some other set of units are specified.\r\n\r\nLooking at Android, assuming pixels if no unit is specified is what we should do (though why wouldn't we use ti.ui.defaultunit?) - but we do need to support dp/in/cm/em etc and convert to pixels internally.", "attachment": [], "flagged": false, "summary": "Windows: Support animation values using units", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "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 } ], "comment": { "comments": [ { "id": "386830", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/719", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-25T23:19:35.000+0000", "updated": "2016-05-25T23:19:35.000+0000" }, { "id": "387420", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "- Add support for {{% cm mm cm em pt pc in px dp dip}} in {{width}} {{height}} {{top}} {{left}} ({{bottom}} and {{right}} are not implemented, see TIMOB-18750)\r\n- Fixed crash when animating {{width}} or {{height}} from {{0}}\r\n- Fixed {{width}} and {{height}} not being retained after animation\r\n\r\nHere's some tests cases. Please note that the animations happen as expected (right positioning, and we don't see an immediate jump form start position to end position). Also, you might want to test with other units, these test cases just use percentages, but it should be tested with values like '100px', '1in', '2345cm', etc.\r\n\r\nh2. TEST CASE # 1\r\nScale height from 0 to 100%\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'black'}),\r\n view = Ti.UI.createView({backgroundColor: 'red', top: 0, left: 0, width:'10%', height: 0}),\r\n animation = Ti.UI.createAnimation({height: \"100%\", curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, duration: 2000});\r\nview.animate(animation);\r\nwin.add(view);\r\nwin.open();\r\n{code}\r\n\r\nh2. TEST CASE # 2\r\nScale width from 0 to 100%\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'black'}),\r\n view = Ti.UI.createView({backgroundColor: 'red', top: 0, left: 0, width:'0', height: '10%'}),\r\n animation = Ti.UI.createAnimation({width: '100%', curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, duration: 2000});\r\nview.animate(animation);\r\nwin.add(view);\r\nwin.open();\r\n{code}\r\n\r\nh2. TEST CASE # 3\r\nTransform left from 0 to 90%\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'black'}),\r\n view = Ti.UI.createView({backgroundColor: 'red', top: 0, left: 0, width:'10%', height: '10%'}),\r\n animation = Ti.UI.createAnimation({left: '90%', curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, duration: 2000});\r\nview.animate(animation);\r\nwin.add(view);\r\nwin.open();\r\n{code}\r\n\r\nh2. TEST CASE # 4\r\nTransform top from 0 to 90%\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'black'}),\r\n view = Ti.UI.createView({backgroundColor: 'red', top: 0, left: 0, width:'10%', height: '10%'}),\r\n animation = Ti.UI.createAnimation({top: '90%', curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, duration: 2000});\r\nview.animate(animation);\r\nwin.add(view);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-06-02T14:28:17.000+0000", "updated": "2016-06-02T14:28:17.000+0000" }, { "id": "389458", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Tested all four test cases above, using different value units (% , px , in , cm). \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-29T21:09:19.000+0000", "updated": "2016-06-29T21:09:19.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }