From e412f5fc22e4d90f355d8653b3fe6e05ed3df914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Fri, 11 Oct 2024 20:06:20 +0200 Subject: [PATCH] FIX: Delete the selected area correctly Previously it was deleting one extra row and column --- webapp/src/components/workbook.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/workbook.tsx b/webapp/src/components/workbook.tsx index 8f06c1c..e129e78 100644 --- a/webapp/src/components/workbook.tsx +++ b/webapp/src/components/workbook.tsx @@ -125,8 +125,8 @@ const Workbook = (props: { model: Model; workbookState: WorkbookState }) => { const row = Math.min(rowStart, rowEnd); const column = Math.min(columnStart, columnEnd); - const width = Math.abs(columnEnd - columnStart) + 1; - const height = Math.abs(rowEnd - rowStart) + 1; + const width = Math.abs(columnEnd - columnStart); + const height = Math.abs(rowEnd - rowStart); model.rangeClearContents( sheet, row,