From 56e53277b71e06450bcfa3e091236232d98166a9 Mon Sep 17 00:00:00 2001 From: Muhammad Fawwaz Orabi Date: Tue, 2 Apr 2019 23:16:58 +0300 Subject: [PATCH] Fix: Force single drag direction --- src/components/RangeBox.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/RangeBox.tsx b/src/components/RangeBox.tsx index d609544..a30d8c5 100644 --- a/src/components/RangeBox.tsx +++ b/src/components/RangeBox.tsx @@ -214,9 +214,9 @@ export const RangeBox = React.memo(function RangeBox({ const newCell = { ...cell, - startX, + startX: moveAxis === 'y' ? cell.startX : startX, endX: startX + cell.spanX - 1, - startY, + startY: moveAxis === 'x' ? cell.startY : startY, endY: startY + cell.spanY - 1, };