Added undo management for rectangle tool

This commit is contained in:
unsettledgames
2020-04-04 15:41:03 +02:00
parent ab0b3e81e3
commit 3bf5d5fbd3
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,8 @@ window.addEventListener("mousedown", function (mouseEvent) {
currentTool = 'pan';
else if (mouseEvent.altKey)
currentTool = 'eyedropper';
else if (mouseEvent.target.className == 'drawingCanvas' && (currentTool == 'pencil' || currentTool == 'eraser'))
else if (mouseEvent.target.className == 'drawingCanvas' &&
(currentTool == 'pencil' || currentTool == 'eraser' || currentTool == 'rectangle'))
new HistoryStateEditCanvas();
else if (currentTool == 'moveselection') {
if (!cursorInSelectedArea()) {