From 3373d2964e72985cc520ae5d445f89168ed3dc87 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Wed, 7 Dec 2022 18:25:59 -0300 Subject: [PATCH] fix selection box when not grid-aligned Signed-off-by: Victor Seiji Hariki --- js/ui/tool/select.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/ui/tool/select.js b/js/ui/tool/select.js index e25cdf3..e2a2c7b 100644 --- a/js/ui/tool/select.js +++ b/js/ui/tool/select.js @@ -101,6 +101,10 @@ const selectTransformTool = () => // Selection bounding box object. Has some witchery to deal with handles. const selectionBB = (x1, y1, x2, y2) => { + x1 = Math.round(x1); + y1 = Math.round(y1); + x2 = Math.round(x2); + y2 = Math.round(y2); return { original: { x: Math.min(x1, x2),