mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed Dialogue bug
This commit is contained in:
parent
d81363ddd0
commit
eada155375
@ -236,7 +236,7 @@ const ColorModule = (() => {
|
|||||||
if (pixelEditorMode == 'Basic')
|
if (pixelEditorMode == 'Basic')
|
||||||
event.target.parentElement.firstChild.jscolor.show();
|
event.target.parentElement.firstChild.jscolor.show();
|
||||||
else
|
else
|
||||||
showDialogue("palette-block", false);
|
Dialogue.showDialogue("palette-block", false);
|
||||||
});
|
});
|
||||||
|
|
||||||
return listItem;
|
return listItem;
|
||||||
|
@ -85,7 +85,7 @@ window.addEventListener("mouseup", function (mouseEvent) {
|
|||||||
tmpContext.clearRect(0, 0, tmpCanvas.width, tmpCanvas.height);
|
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') {
|
if (currentTool.name == 'eyedropper' && mouseEvent.target.className == 'drawingCanvas') {
|
||||||
var cursorLocation = getCursorPosition(mouseEvent);
|
var cursorLocation = getCursorPosition(mouseEvent);
|
||||||
@ -213,7 +213,7 @@ function draw (mouseEvent) {
|
|||||||
var cursorLocation = lastMouseMovePos;
|
var cursorLocation = lastMouseMovePos;
|
||||||
|
|
||||||
//if a document hasnt yet been created or the current layer is locked, exit this function
|
//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
|
// Moving brush preview
|
||||||
currentTool.moveBrushPreview(cursorLocation);
|
currentTool.moveBrushPreview(cursorLocation);
|
||||||
|
Loading…
Reference in New Issue
Block a user