Added Selection menu

Also fixed a few minor bugs.
This commit is contained in:
unsettledgames
2020-06-06 21:44:52 +02:00
parent a252d396c6
commit 0fc1df1650
5 changed files with 42 additions and 15 deletions

View File

@ -26,7 +26,8 @@ window.addEventListener("mousedown", function (mouseEvent) {
(currentTool.name == 'pencil' || currentTool.name == 'eraser' || currentTool.name == 'rectangle'))
new HistoryStateEditCanvas();
else if (currentTool.name == 'moveselection') {
if (!cursorInSelectedArea()) {
if (!cursorInSelectedArea() &&
((mouseEvent.target.id == 'canvas-view') || mouseEvent.target.className == 'drawingCanvas')) {
tool.pencil.switchTo();
canDraw = false;
}