Fixing PresetModule

This commit is contained in:
Leamsi Escribano 2021-06-29 08:35:17 -04:00
parent d6d97105d6
commit 71f4abe514
3 changed files with 5 additions and 6 deletions

View File

@ -209,13 +209,12 @@ function newPixel (width, height, editorMode, fileContent = null) {
function newFromTemplate(preset, x, y) {
if (preset != '') {
const presetProperties = presetsModule.propertiesOf(preset);
const presetProperties = PresetModule.propertiesOf(preset);
Util.setText('palette-button-splash', presetProperties.palette);
Util.setText('palette-button', presetProperties.palette);
x = presets[preset].width;
y = presets[preset].height;
x = presetProperties.width;
y = presetProperties.height;
}
newPixel(x, y, pixelEditorMode == 'Advanced' ? 'Basic' : 'Advanced');
}

View File

@ -1,4 +1,4 @@
const presetsModule = (() => {
const PresetModule = (() => {
const presets = {
'Gameboy Color': {width: 240, height: 203, palette: 'Gameboy Color'},
'PICO-8': {width: 128, height: 128, palette: 'PICO-8'},

View File

@ -85,4 +85,4 @@
//=include _featureToggles.js
// Controls execution of this preset module
presetsModule.instrumentPresetMenu();
PresetModule.instrumentPresetMenu();