Added EditorState, moved editor mode management to that IIFE

This commit is contained in:
unsettledgames
2021-07-23 18:54:09 +02:00
parent 366c2d9e2a
commit 404b1c56c1
5 changed files with 78 additions and 82 deletions

View File

@@ -228,7 +228,7 @@ const ColorModule = (() => {
event.target.parentElement.lastChild.classList.add('hidden');
//show jscolor picker, if basic mode is enabled
if (pixelEditorMode == 'Basic')
if (EditorState.getCurrentMode() == 'Basic')
event.target.parentElement.firstChild.jscolor.show();
else
Dialogue.showDialogue("palette-block", false);