fix cancel action for select tool

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>

Former-commit-id: 0bfa9a2cae4aa080571ae8eca576c94c023b6d44
This commit is contained in:
Victor Seiji Hariki 2022-11-25 00:59:10 -03:00
parent 97f3a54644
commit 8419f52f43

View file

@ -62,6 +62,13 @@ const selectTransformTool = () =>
};
state.reset = () => {
if (state.selected)
imgCtx.drawImage(
state.selected.image,
state.selected.original.x,
state.selected.original.y
);
if (state.dragging) state.dragging = null;
else state.selected = null;