From eada155375131725df132437f260a0b7a80535c7 Mon Sep 17 00:00:00 2001 From: unsettledgames <47360416+unsettledgames@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:00:12 +0200 Subject: [PATCH] Fixed Dialogue bug --- js/ColorModule.js | 2 +- js/_mouseEvents.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ColorModule.js b/js/ColorModule.js index 80fdfb3..afdbdf3 100644 --- a/js/ColorModule.js +++ b/js/ColorModule.js @@ -236,7 +236,7 @@ const ColorModule = (() => { if (pixelEditorMode == 'Basic') event.target.parentElement.firstChild.jscolor.show(); else - showDialogue("palette-block", false); + Dialogue.showDialogue("palette-block", false); }); return listItem; diff --git a/js/_mouseEvents.js b/js/_mouseEvents.js index f9ee578..4257f0a 100644 --- a/js/_mouseEvents.js +++ b/js/_mouseEvents.js @@ -85,7 +85,7 @@ window.addEventListener("mouseup", function (mouseEvent) { tmpContext.clearRect(0, 0, tmpCanvas.width, tmpCanvas.height); } - if (!documentCreated || dialogueOpen || !currentLayer.isVisible || currentLayer.isLocked) return; + if (!documentCreated || Dialogue.isOpen() || !currentLayer.isVisible || currentLayer.isLocked) return; if (currentTool.name == 'eyedropper' && mouseEvent.target.className == 'drawingCanvas') { var cursorLocation = getCursorPosition(mouseEvent); @@ -213,7 +213,7 @@ function draw (mouseEvent) { var cursorLocation = lastMouseMovePos; //if a document hasnt yet been created or the current layer is locked, exit this function - if (!documentCreated || dialogueOpen || !currentLayer.isVisible || currentLayer.isLocked) return; + if (!documentCreated || Dialogue.isOpen() || !currentLayer.isVisible || currentLayer.isLocked) return; // Moving brush preview currentTool.moveBrushPreview(cursorLocation);