Added back tool shortctus

Made Events an IIFE instead of a class, fixed a bug in the selection tool.
This commit is contained in:
unsettledgames
2021-11-09 12:19:57 +01:00
parent 3c62a1f0fd
commit 2ca5aa75b4
15 changed files with 110 additions and 97 deletions

View File

@@ -12,6 +12,8 @@ class FillTool extends Tool {
return;
this.fill(mousePos);
currentLayer.updateLayerPreview();
new HistoryState().EditCanvas();
}
@@ -37,9 +39,6 @@ class FillTool extends Tool {
return (r == color[0] && g == color[1] && b == color[2] && a == color[3]);
}
//save history state
new HistoryState().EditCanvas();
//temporary image holds the data while we change it
let tempImage = currentLayer.context.getImageData(0, 0, canvasSize[0], canvasSize[1]);