refactor(utils): remove react dependencies

This commit is contained in:
moklick
2023-03-02 14:32:39 +01:00
parent 3b83e029e6
commit df6c3381b1
7 changed files with 19 additions and 49 deletions
@@ -59,7 +59,7 @@ export function handlePointerDown({
let autoPanId = 0;
let prevClosestHandle: ConnectionHandle | null;
const { x, y } = getEventPosition(event);
const { x, y } = getEventPosition(event.nativeEvent);
const clickedHandle = doc?.elementFromPoint(x, y);
const handleType = getHandleType(edgeUpdaterType, clickedHandle);
const containerBounds = domNode?.getBoundingClientRect();
@@ -69,7 +69,7 @@ export function handlePointerDown({
}
let prevActiveHandle: Element;
let connectionPosition = getEventPosition(event, containerBounds);
let connectionPosition = getEventPosition(event.nativeEvent, containerBounds);
let autoPanStarted = false;
let connection: Connection | null = null;
let isValid = false;