forked from 0x2620/oxjs
fixing column resize bug
This commit is contained in:
parent
b90587e048
commit
cd1bde4348
2 changed files with 14 additions and 4 deletions
|
|
@ -1267,8 +1267,10 @@ Ox.formatValue = function(num, str) {
|
|||
>>> Ox.formatValue(123456789, "B")
|
||||
???
|
||||
*/
|
||||
var val = "";
|
||||
$.each(["K", "M", "G", "T", "P"], function(i, v) {
|
||||
var arr = ["K", "M", "G", "T", "P"],
|
||||
len = arr.length,
|
||||
val = "";
|
||||
$.each(arr, function(i, v) {
|
||||
if (num < Math.pow(1024, i + 2) || i == len - 1) {
|
||||
val = Ox.formatNumber(num / Math.pow(1024, i + 1), i) + " " + v + str;
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue