diff --git a/js/_newPixel.js b/js/_newPixel.js index 35a165d..e1ea9cc 100644 --- a/js/_newPixel.js +++ b/js/_newPixel.js @@ -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'); } \ No newline at end of file diff --git a/js/_presets.js b/js/_presets.js index 63ea9db..955f243 100644 --- a/js/_presets.js +++ b/js/_presets.js @@ -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'}, diff --git a/js/pixel-editor.js b/js/pixel-editor.js index 4b4f333..137a9bf 100644 --- a/js/pixel-editor.js +++ b/js/pixel-editor.js @@ -85,4 +85,4 @@ //=include _featureToggles.js // Controls execution of this preset module -presetsModule.instrumentPresetMenu(); \ No newline at end of file +PresetModule.instrumentPresetMenu(); \ No newline at end of file