diff --git a/src/components/konva/Selection.tsx b/src/components/konva/Selection.tsx index 439a854..65b96a1 100644 --- a/src/components/konva/Selection.tsx +++ b/src/components/konva/Selection.tsx @@ -160,6 +160,9 @@ function Selection({ onMouseUp: handlePointerUp, onTouchStart: handlePointerDown, onTouchEnd: handlePointerUp, + // Increase stroke width when drawing a selection to + // prevent deselection click event from firing + hitStrokeWidth: hasItems ? undefined : 100, }; const x = selection.x * mapWidth; const y = selection.y * mapHeight; diff --git a/src/components/tools/SelectTool.tsx b/src/components/tools/SelectTool.tsx index 1d3ffda..8a1399e 100644 --- a/src/components/tools/SelectTool.tsx +++ b/src/components/tools/SelectTool.tsx @@ -228,6 +228,7 @@ function SelectTool({ return; } onSelectionChange(null); + onSelectionMenuOpen(false); } interactionEmitter?.on("dragStart", handleBrushDown);