chore(edge-renderer): cleanup types

This commit is contained in:
moklick
2022-08-08 17:31:04 +02:00
parent 72a3700a22
commit ff79bb8f03
2 changed files with 39 additions and 50 deletions
@@ -7,7 +7,7 @@ import {
EdgeTypesWrapped,
HandleElement,
NodeHandleBounds,
NodeInternals,
Node,
Position,
Rect,
Transform,
@@ -166,8 +166,7 @@ export function isEdgeVisible({
return overlappingArea > 0;
}
export function getNodeData(nodeInternals: NodeInternals, nodeId: string): [Rect, NodeHandleBounds | null, boolean] {
const node = nodeInternals.get(nodeId);
export function getNodeData(node: Node): [Rect, NodeHandleBounds | null, boolean] {
const handleBounds = node?.[internalsSymbol]?.handleBounds || null;
const isInvalid =