From abd4ce4ea5c8083dc91b06fd26f67dc5f1ba0b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Tue, 8 Oct 2024 21:24:00 +0200 Subject: [PATCH] =?UTF-8?q?FIX:=20Let=E2=80=99s=20move=20the=20outline=20h?= =?UTF-8?q?andle=20to=20left=20and=20top=201px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/src/components/WorksheetCanvas/worksheetCanvas.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/src/components/WorksheetCanvas/worksheetCanvas.ts b/webapp/src/components/WorksheetCanvas/worksheetCanvas.ts index 2639ad0..79338cf 100644 --- a/webapp/src/components/WorksheetCanvas/worksheetCanvas.ts +++ b/webapp/src/components/WorksheetCanvas/worksheetCanvas.ts @@ -1140,8 +1140,8 @@ export default class WorksheetCanvas { editor.style.height = `${height - 1}px`; // Position the cell outline and clip it - cellOutline.style.left = `${x - padding}px`; - cellOutline.style.top = `${y - padding}px`; + cellOutline.style.left = `${x - padding - 1}px`; + cellOutline.style.top = `${y - padding - 1}px`; // Reset CSS properties cellOutline.style.minWidth = ""; cellOutline.style.minHeight = ""; @@ -1244,8 +1244,8 @@ export default class WorksheetCanvas { const handleBBox = cellOutlineHandle.getBoundingClientRect(); const handleWidth = handleBBox.width; const handleHeight = handleBBox.height; - cellOutlineHandle.style.left = `${handleX - handleWidth / 2}px`; - cellOutlineHandle.style.top = `${handleY - handleHeight / 2}px`; + cellOutlineHandle.style.left = `${handleX - handleWidth / 2 - 1}px`; + cellOutlineHandle.style.top = `${handleY - handleHeight / 2 - 1}px`; } private drawActiveRanges(topLeftCell: Cell, bottomRightCell: Cell): void {