[TIMOB-19351] Windows: Support animation values using units
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-06-02T14:28:24.000+0000 |
Affected Version/s | Release 4.1.0 |
Fix Version/s | Release 5.4.0 |
Components | Windows |
Labels | qe-5.4.0 |
Reporter | Christopher Williams |
Assignee | Gary Mathews |
Created | 2015-08-13T21:11:00.000+0000 |
Updated | 2016-06-29T21:09:30.000+0000 |
Description
Our animation code assumes pixels for units, regardless of whether some other set of units are specified.
Looking 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.
master: https://github.com/appcelerator/titanium_mobile_windows/pull/719
- Add support for
% cm mm cm em pt pc in px dp dip
inwidth
height
top
left
(bottom
andright
are not implemented, see TIMOB-18750) - Fixed crash when animatingwidth
orheight
from0
- Fixedwidth
andheight
not being retained after animation Here'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.TEST CASE # 1
Scale height from 0 to 100%TEST CASE # 2
Scale width from 0 to 100%TEST CASE # 3
Transform left from 0 to 90%TEST CASE # 4
Transform top from 0 to 90%Verified as fixed, Tested all four test cases above, using different value units (% , px , in , cm). Tested on: Windows 10 Pro Windows Phone 10.0 (Microsoft Lumia 640 LTE) Appc Studio: 4.7.0.201606220541 Ti SDK: 5.4.0.v20160627224205 Appc NPM: 4.2.7-2 Appc Core: 5.4.0-20 Node: v4.4.4 *Closing Ticket.*