Deleted _createColorPalette.js, commented files

Moved createColorPalette to the ColorModule, removed _onLoad.js and _onbeforeunload.js, commented the code and labelled with REFACTOR the comments that refere to the refactoring.
This commit is contained in:
unsettledgames
2021-07-18 23:17:41 +02:00
parent 7976675132
commit 7c4fb652cf
11 changed files with 138 additions and 112 deletions

View File

@@ -161,7 +161,7 @@ const Startup = (() => {
history.pushState(null, null, '/pixel-editor');
//fill the palette with specified colours
createColorPalette(palettes[selectedPalette].colors,true);
ColorModule.createColorPalette(palettes[selectedPalette].colors);
}
// Otherwise, I just generate 2 semirandom colours
else {
@@ -206,7 +206,7 @@ const Startup = (() => {
createdLayer.updateLayerPreview();
if (i == (fileContent['nLayers'] - 1)) {
createPaletteFromLayers();
ColorModule.createPaletteFromLayers();
}
};