From a56c9576a94308711893dc18683193668b2f80f1 Mon Sep 17 00:00:00 2001 From: unsettledgames <47360416+unsettledgames@users.noreply.github.com> Date: Sat, 12 Sep 2020 11:45:27 +0200 Subject: [PATCH] Fixed mode switch bug --- js/_editorMode.js | 3 --- js/_layer.js | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/js/_editorMode.js b/js/_editorMode.js index 0b87076..e89626c 100644 --- a/js/_editorMode.js +++ b/js/_editorMode.js @@ -26,11 +26,8 @@ function switchMode(currentMode, mustConfirm = true) { //switch to basic mode else { - - //if there is a current layer (a document is active) if (currentLayer) { - //confirm with user before flattening image if (mustConfirm ) { if (!confirm('Switching to basic mode will flatten all the visible layers. Are you sure you want to continue?')) { diff --git a/js/_layer.js b/js/_layer.js index c37684e..d2bc82a 100644 --- a/js/_layer.js +++ b/js/_layer.js @@ -244,9 +244,10 @@ class Layer { layer.menuEntry.classList.add("selected-layer"); currentLayer = layer; } - +/* canvas = currentLayer.canvas; context = currentLayer.context; +*/ } toggleLock() {