Fixed invisible cursor outside of canvas

This commit is contained in:
unsettledgames 2021-06-30 22:47:45 +02:00
parent 1a69b48297
commit d7b04d7699
2 changed files with 9 additions and 4 deletions

View File

@ -354,7 +354,7 @@ svg {
left: 64px;
right: 48px;
top: 48px;
cursor: none;
cursor: default;
position: fixed;
display: block;
}

View File

@ -32,8 +32,6 @@ window.addEventListener("mousedown", function (mouseEvent) {
}
}
currentTool.updateCursor();
if (!currentLayer.isLocked && !currentLayer.isVisible && canDraw) {
draw(mouseEvent);
}
@ -420,6 +418,13 @@ function draw (mouseEvent) {
currentLayer.updateLayerPreview();
}
}
if (mouseEvent.target.className == 'drawingCanvas')
currentTool.updateCursor();
else
canvasView.style.cursor = 'default';
console.log("Cursor: " + canvasView.style.cursor);
}
//mousewheel scroll