1
0
Fork 0
forked from 0x2620/oxjs

use base 10 in parseInt, use Math.floor for numbers

This commit is contained in:
rolux 2012-06-13 10:28:21 +02:00
commit 8bc8c57373
19 changed files with 44 additions and 45 deletions

View file

@ -74,7 +74,7 @@ Ox.Chart = function(options, self) {
});
}
self.sort[key] = key.replace(/(\d+)/g, function(number) {
return Ox.pad(parseInt(number), 16);
return Ox.pad(parseInt(number, 10), 16);
});
});
self.max = Ox.max(self.totals);
@ -83,7 +83,7 @@ Ox.Chart = function(options, self) {
if (self.subData) {
Ox.forEach(self.subData, function(subValue, subKey) {
self.sort[subKey] = subKey.replace(/(\d+)/g, function(number) {
return Ox.pad(parseInt(number), 16);
return Ox.pad(parseInt(number, 10), 16);
});
});
self.subKeys = Object.keys(self.subData).sort(function(a, b) {