1
0
Fork 0
forked from 0x2620/oxjs

fix bugs in video editor; begin to implement new list map mode that allows for defining/clearing places

This commit is contained in:
rlx 2012-02-04 08:58:46 +00:00
commit 3c94f44a99
15 changed files with 437 additions and 255 deletions

View file

@ -9,9 +9,10 @@ Ox.formatArea <f> Formats a number of meters as square meters or kilometers
@*/
Ox.formatArea = function(num, dec) {
dec = Ox.isUndefined(dec) ? 8 : dec;
var km = num >= 1000000;
return Ox.formatNumber(
(km ? num / 1000000 : num).toPrecision(8)
(km ? num / 1000000 : num).toPrecision(dec)
) + ' ' + (km ? 'k' : '') + 'm\u00B2';
};

View file

@ -1,3 +1,4 @@
'use strict';
/*@
Ox.cache <f> Memoize a function
<script>
@ -26,4 +27,4 @@ Ox.cache = function(fn) {
return ret;
}
return ret;
};
};