mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed invisible cursor outside of canvas
This commit is contained in:
parent
1a69b48297
commit
d7b04d7699
@ -354,7 +354,7 @@ svg {
|
||||
left: 64px;
|
||||
right: 48px;
|
||||
top: 48px;
|
||||
cursor: none;
|
||||
cursor: default;
|
||||
position: fixed;
|
||||
display: block;
|
||||
}
|
||||
|
@ -30,9 +30,7 @@ window.addEventListener("mousedown", function (mouseEvent) {
|
||||
tool.pencil.switchTo();
|
||||
canDraw = false;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user