Almost finished deleting layers

There's a bug that happens when the user tries to delete the Layer 0. All the other ones work correctly.
This commit is contained in:
unsettledgames
2020-06-22 23:07:40 +02:00
parent 349a4417d8
commit 50b962a7f5
5 changed files with 147 additions and 27 deletions

View File

@@ -67,6 +67,10 @@ window.addEventListener("mouseup", function (mouseEvent) {
currentMouseEvent = mouseEvent;
closeMenu();
if (!isChildOfByClass(mouseEvent.target, "layers-menu-entry")) {
currentLayer.closeOptionsMenu();
}
if (!documentCreated || dialogueOpen || currentLayer.isLocked) return;