Skip to content

Commit 5c9fcef

Browse files
🐛(frontend) Switched to pointer collision strategy
1 parent 39b3081 commit 5c9fcef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client/src/components/Board/Board.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
DndContext,
55
DragOverlay,
66
closestCenter,
7+
pointerWithin,
78
KeyboardSensor,
89
PointerSensor,
910
useSensor,
@@ -77,7 +78,7 @@ function Board({
7778
const sensors = useSensors(
7879
useSensor(PointerSensor, {
7980
activationConstraint: {
80-
distance: 1,
81+
distance: 5,
8182
},
8283
}),
8384
useSensor(KeyboardSensor, {
@@ -312,7 +313,7 @@ function Board({
312313
<div className={styles.wrapper}>
313314
<DndContext
314315
sensors={sensors}
315-
collisionDetection={closestCenter}
316+
collisionDetection={pointerWithin}
316317
onDragStart={handleDragStart}
317318
onDragOver={handleDragOver}
318319
onDragEnd={handleDragEnd}

0 commit comments

Comments
 (0)