remove 'factor' argument from Ox.formatUnit
This commit is contained in:
parent
f0ba793a85
commit
fbe2513cb4
1 changed files with 6 additions and 7 deletions
|
@ -646,14 +646,13 @@ Ox.formatString = function (string, collection) {
|
|||
|
||||
/*@
|
||||
Ox.formatUnit <f> Formats a number with a unit
|
||||
> Ox.formatUnit(0.333333, '%', 2, 100)
|
||||
"33.33%"
|
||||
> Ox.formatUnit(100/3, 'm', 2)
|
||||
'33.33 m'
|
||||
> Ox.formatUnit(100/3, '%')
|
||||
'33%'
|
||||
@*/
|
||||
// FIXME: why factor??
|
||||
Ox.formatUnit = function(number, string, decimals, factor) {
|
||||
decimals = Ox.isUndefined(decimals) ? 3 : decimals;
|
||||
factor = Ox.isUndefined(factor) ? 1 : factor;
|
||||
return Ox.formatNumber(number * factor, decimals)
|
||||
Ox.formatUnit = function(number, string, decimals) {
|
||||
return Ox.formatNumber(number, decimals)
|
||||
+ (string == '%' ? '' : ' ') + string;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue