Fixed
Details
Assignee
Justin ObaraJustin ObaraReporter
Justin ObaraJustin ObaraComponents
Fix versions
Priority
Major
Details
Details
Assignee
Justin Obara
Justin ObaraReporter
Justin Obara
Justin ObaraComponents
Fix versions
Priority
Created July 25, 2017 at 1:33 PM
Updated July 31, 2017 at 2:32 PM
Resolved July 31, 2017 at 2:32 PM
Currently there is only a rounding transformation to round to the nearest integer. However, there may be cases where you'd want to round to some decimal value. For example, in GPII the common terms value for font size is in pts. In the UIO+ browser extension we want a magnification factor. The obvious solution here is to divide by the default size setting ( 12pt in this case ), but that may result in a number like 1.333333333333, which could be handled as 1.3 instead.
The fluid.transforms.round transformation should be modified to handle transforms to optionally handle transforms to a give decimal based on the scale. Similar to how the fluid.transforms.numberToString transformation works.
See: https://botbot.me/freenode/fluid-work/2017-07-25/?msg=89018961&page=1