mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixing PresetModule
This commit is contained in:
parent
d6d97105d6
commit
71f4abe514
@ -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');
|
||||
}
|
@ -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'},
|
||||
|
@ -85,4 +85,4 @@
|
||||
//=include _featureToggles.js
|
||||
|
||||
// Controls execution of this preset module
|
||||
presetsModule.instrumentPresetMenu();
|
||||
PresetModule.instrumentPresetMenu();
|
Loading…
Reference in New Issue
Block a user