cleanup of performance improvement

This commit is contained in:
jdescottes
2014-07-03 00:48:49 +02:00
parent a2e2459169
commit fa626532ba
5 changed files with 34 additions and 28 deletions

View File

@ -10,7 +10,6 @@
// I apologize to my future self for this one.
var NO_SCROLL_MAX_COLORS = 20;
var MAX_COLORS = 100;
ns.PalettesListController = function (paletteController, usedColorService) {
this.usedColorService = usedColorService;
@ -80,8 +79,8 @@
}
}
if (colors.length > MAX_COLORS) {
colors = colors.slice(0, MAX_COLORS);
if (colors.length > Constants.MAX_CURRENT_COLORS_DISPLAYED) {
colors = colors.slice(0, Constants.MAX_CURRENT_COLORS_DISPLAYED);
}
return colors;