Browse Source

Sort objects in order of decreasing size

tags/v0.1.0
Fen Dweller 5 years ago
parent
commit
a2968e1972
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      presets/objects.js

+ 6
- 0
presets/objects.js View File

@@ -115,6 +115,12 @@ function makeObjects() {
}
)
});
results.sort((b1, b2) => {
e1 = b1.constructor();
e2 = b2.constructor();
return -math.subtract(e1.views[e1.defaultView].height, e2.views[e2.defaultView].height).value;
});

return results;
}

Loading…
Cancel
Save