gridster/fix: using comparators in sort methods.

Sort method by default orders alphabetically, but we are sorting numbers
and this means that: 40 < 6. And we not expect this result.
This commit is contained in:
vieron
2013-06-13 12:01:47 +02:00
parent bfbcba0ea3
commit e1a5b4ed52
+6 -2
View File
@@ -1384,7 +1384,9 @@
return true; //break
}
upper_rows[tcol].sort();
upper_rows[tcol].sort(function(a, b) {
return a - b;
});
});
if (!result) { return false; }
@@ -1439,7 +1441,9 @@
return true; //break
}
upper_rows[tcol].sort();
upper_rows[tcol].sort(function(a, b) {
return a - b;
});
});
if (!result) { return false; }