chore: remove unused imports
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+2
-17
@@ -1,5 +1,5 @@
|
||||
import { isGraphNode, rectToBox } from './graph'
|
||||
import { Edge, EdgePositions, GraphNode, HandleElement, Position, Transform, XYPosition, FlowElements, GraphEdge } from '~/types'
|
||||
import { rectToBox } from './graph'
|
||||
import { EdgePositions, GraphNode, HandleElement, Position, Transform, XYPosition } from '~/types'
|
||||
|
||||
export function getHandlePosition(position: Position, node: GraphNode, handle?: HandleElement): XYPosition {
|
||||
const x = (handle?.x ?? 0) + node.position.x
|
||||
@@ -102,18 +102,3 @@ export function isEdgeVisible({ sourcePos, targetPos, width, height, transform }
|
||||
|
||||
return overlappingArea > 0
|
||||
}
|
||||
|
||||
export const getSourceTargetNodes = (edge: GraphEdge | Edge, elements: FlowElements) => {
|
||||
const nodes: GraphNode[] = []
|
||||
for (const el of elements) {
|
||||
if (!nodes[0] || !nodes[1]) {
|
||||
if (isGraphNode(el)) {
|
||||
if (el.id === edge.source) nodes[0] = el
|
||||
if (el.id === edge.target) nodes[1] = el
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return { sourceNode: nodes[0], targetNode: nodes[1] }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user