From 614be7b9e30fa9774f4b47828a728b53bf31e153 Mon Sep 17 00:00:00 2001 From: Chris Maltby Date: Fri, 15 Nov 2024 13:57:46 +0000 Subject: [PATCH] Fix issue preventing shift click line drawing for collisions and colors --- src/components/world/WorldView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/world/WorldView.tsx b/src/components/world/WorldView.tsx index f610d7ad3..db1a54496 100644 --- a/src/components/world/WorldView.tsx +++ b/src/components/world/WorldView.tsx @@ -588,7 +588,7 @@ const WorldView = () => { const onStartMultiSelection = useCallback( (e: React.MouseEvent) => { - if (e.shiftKey && scrollRef.current) { + if (e.shiftKey && tool === "select" && scrollRef.current) { e.preventDefault(); e.stopPropagation(); @@ -605,7 +605,7 @@ const WorldView = () => { window.addEventListener("mouseup", onEndMultiSelection); } }, - [onEndMultiSelection, onMoveMultiSelection, scrollRef, zoomRatio] + [onEndMultiSelection, onMoveMultiSelection, scrollRef, tool, zoomRatio] ); useEffect(() => {