Fixed issue #18

This commit is contained in:
unsettledgames 2020-09-16 12:43:51 +02:00
parent b7d5f603b1
commit 267d1a170e
2 changed files with 156 additions and 151 deletions

View File

@ -239,9 +239,11 @@ function HistoryStateAddLayer(layerData, index) {
this.undo = function() {
redoStates.push(this);
layers[this.index + 1].selectLayer();
this.added.canvas.remove();
this.added.menuEntry.remove();
layers.splice(index, 1);
};

View File

@ -176,6 +176,8 @@ function setPreviewPosition(preview, cursor, size){
//mouse is moving on canvas
window.addEventListener("mousemove", draw, false);
function draw (mouseEvent) {
if (!dialogueOpen)
{
lastMouseMovePos = getCursorPosition(mouseEvent);
// Saving the event in case something else needs it
currentMouseEvent = mouseEvent;
@ -338,6 +340,7 @@ function draw (mouseEvent) {
}
}
}
}
//mousewheel scroll
canvasView.addEventListener("wheel", function(mouseEvent){