mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Added history states for canvas resizing
Must fix bug that happens when creating a new layer after resizing the canvas
This commit is contained in:
@ -12,8 +12,8 @@ function getCursorPosition(e) {
|
||||
y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
|
||||
}
|
||||
|
||||
x -= canvas.offsetLeft;
|
||||
y -= canvas.offsetTop;
|
||||
x -= currentLayer.canvas.offsetLeft;
|
||||
y -= currentLayer.canvas.offsetTop;
|
||||
|
||||
return [Math.round(x), Math.round(y)];
|
||||
}
|
Reference in New Issue
Block a user