From 2f21a2220d50d0c1d352430b9e49e3f23fcd9057 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:11:03 +1000 Subject: [PATCH] fix(ui): do not floor bbox calc, it cuts off the last pixels --- .../web/src/features/controlLayers/konva/entityBbox.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/entityBbox.ts b/invokeai/frontend/web/src/features/controlLayers/konva/entityBbox.ts index 1448d5a8f7..0dcb9d2d3c 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/entityBbox.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/entityBbox.ts @@ -188,12 +188,7 @@ const getLayerBboxPixels = ( */ export const getNodeBboxFast = (node: Konva.Node): IRect => { const bbox = node.getClientRect(GET_CLIENT_RECT_CONFIG); - return { - x: Math.floor(bbox.x), - y: Math.floor(bbox.y), - width: Math.floor(bbox.width), - height: Math.floor(bbox.height), - }; + return bbox; }; const filterRGChildren = (node: Konva.Node): boolean => node.name() === RG_LAYER_OBJECT_GROUP_NAME;