Added a grid snapping sensitivity accessibility option

This commit is contained in:
Mitchell McCaffrey
2021-02-07 16:42:29 +11:00
parent 905b43a64b
commit 76533852cd
5 changed files with 32 additions and 10 deletions

View File

@@ -11,8 +11,6 @@ import colors from "../../helpers/colors";
import usePrevious from "../../hooks/usePrevious";
import useGridSnapping from "../../hooks/useGridSnapping";
const snappingThreshold = 1 / 5;
function Note({
note,
map,
@@ -35,7 +33,7 @@ function Note({
const noteHeight = noteWidth;
const notePadding = noteWidth / 10;
const snapNodeToGrid = useGridSnapping(snappingThreshold);
const snapNodeToGrid = useGridSnapping();
function handleDragStart(event) {
onNoteDragStart && onNoteDragStart(event, note.id);