forked from 0x2620/oxjs
less obscure Ox.map
This commit is contained in:
parent
33390069b9
commit
12cf77cef5
21 changed files with 125 additions and 101 deletions
|
|
@ -154,8 +154,8 @@ Ox.Chart = function(options, self) {
|
|||
});
|
||||
while (Ox.sum(widths) != totalWidth) {
|
||||
max = Ox.max(widths);
|
||||
maxKeys = Ox.map(Object.keys(widths), function(key) {
|
||||
return widths[key] == max ? key : null;
|
||||
maxKeys = Object.keys(widths).filter(function(key) {
|
||||
return widths[key] == max;
|
||||
});
|
||||
widths[maxKeys[0]] += Ox.sum(widths) < totalWidth ? 1 : -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue