mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed issue #18
This commit is contained in:
parent
b7d5f603b1
commit
267d1a170e
@ -239,9 +239,11 @@ function HistoryStateAddLayer(layerData, index) {
|
|||||||
|
|
||||||
this.undo = function() {
|
this.undo = function() {
|
||||||
redoStates.push(this);
|
redoStates.push(this);
|
||||||
|
layers[this.index + 1].selectLayer();
|
||||||
|
|
||||||
this.added.canvas.remove();
|
this.added.canvas.remove();
|
||||||
this.added.menuEntry.remove();
|
this.added.menuEntry.remove();
|
||||||
|
|
||||||
layers.splice(index, 1);
|
layers.splice(index, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -176,6 +176,8 @@ function setPreviewPosition(preview, cursor, size){
|
|||||||
//mouse is moving on canvas
|
//mouse is moving on canvas
|
||||||
window.addEventListener("mousemove", draw, false);
|
window.addEventListener("mousemove", draw, false);
|
||||||
function draw (mouseEvent) {
|
function draw (mouseEvent) {
|
||||||
|
if (!dialogueOpen)
|
||||||
|
{
|
||||||
lastMouseMovePos = getCursorPosition(mouseEvent);
|
lastMouseMovePos = getCursorPosition(mouseEvent);
|
||||||
// Saving the event in case something else needs it
|
// Saving the event in case something else needs it
|
||||||
currentMouseEvent = mouseEvent;
|
currentMouseEvent = mouseEvent;
|
||||||
@ -338,6 +340,7 @@ function draw (mouseEvent) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//mousewheel scroll
|
//mousewheel scroll
|
||||||
canvasView.addEventListener("wheel", function(mouseEvent){
|
canvasView.addEventListener("wheel", function(mouseEvent){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user