Fix deselection for path selection

This commit is contained in:
Mitchell McCaffrey 2021-07-22 15:10:42 +10:00
parent 986f1efc9b
commit 7860871e7e
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -228,6 +228,7 @@ function SelectTool({
return;
}
onSelectionChange(null);
onSelectionMenuOpen(false);
}
interactionEmitter?.on("dragStart", handleBrushDown);