Fixed Dialogue bug

This commit is contained in:
unsettledgames 2021-07-14 23:00:12 +02:00
parent d81363ddd0
commit eada155375
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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);