diff --git a/js/Events.js b/js/Events.js index 7afb8486..1f6a897a 100644 --- a/js/Events.js +++ b/js/Events.js @@ -28,7 +28,7 @@ Events = { REDRAW_PREVIEWFILM: "REDRAW_PREVIEWFILM", GRID_DISPLAY_STATE_CHANGED: "GRID_DISPLAY_STATE_CHANGED", - + /** * The framesheet was reseted and is now probably drastically different. * Number of frames, content of frames, color used for the palette may have changed. diff --git a/js/controller/PaletteController.js b/js/controller/PaletteController.js index 816f25d5..bca36b94 100644 --- a/js/controller/PaletteController.js +++ b/js/controller/PaletteController.js @@ -14,15 +14,22 @@ $.publish(Events.COLOR_SELECTED, [inputPicker.val(), evt.data.isPrimary]); }; - /** + /** * @private */ - ns.PaletteController.prototype.createPalette_ = function (colors) { + ns.PaletteController.prototype.createPaletteMarkup_ = function (colors) { // Always adding transparent color this.paletteRoot.html(''); - for(var color in colors) { + + for(var i=0, l=this.paletteColors.length; i