chore(core): lint files

This commit is contained in:
braks
2024-01-21 14:35:35 +01:00
committed by Braks
parent 8bf6f26d3d
commit 68cfbaebbe
11 changed files with 74 additions and 69 deletions
+1 -1
View File
@@ -363,7 +363,7 @@ export function getRectOfNodes(nodes: GraphNode[]) {
...dimensions,
} as Rect),
),
{ x: Infinity, y: Infinity, x2: -Infinity, y2: -Infinity },
{ x: Number.POSITIVE_INFINITY, y: Number.POSITIVE_INFINITY, x2: Number.NEGATIVE_INFINITY, y2: Number.NEGATIVE_INFINITY },
)
return boxToRect(box)
+1 -1
View File
@@ -99,7 +99,7 @@ export function getClosestHandle(
// if we couldn't find a handle below the mouse cursor we look for the closest distance based on the connectionRadius
let closestHandles: { handle: ConnectionHandle; validHandleResult: ValidHandleResult }[] = []
let minDistance = Infinity
let minDistance = Number.POSITIVE_INFINITY
handles.forEach((handle) => {
const distance = Math.sqrt((handle.x - pos.x) ** 2 + (handle.y - pos.y) ** 2)