fix pixel alingment on select for scaling

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
Victor Seiji Hariki 2022-12-07 23:17:46 -03:00
parent 3701eb110b
commit 458df53fac

View file

@ -354,11 +354,13 @@ const selectTransformTool = () =>
"Image Transform Erase",
state.original
);
commands.runCommand(
"drawImage",
"Image Transform Draw",
state.selected
);
commands.runCommand("drawImage", "Image Transform Draw", {
image: state.selected.image,
x: Math.round(state.selected.x),
y: Math.round(state.selected.y),
w: Math.round(state.selected.w),
h: Math.round(state.selected.h),
});
state.original = null;
state.selected = null;