chore(core): cleanup
This commit is contained in:
@@ -83,7 +83,7 @@ export function useGetters(state: State, nodeIds: ComputedRef<string[]>, edgeIds
|
|||||||
return nodes
|
return nodes
|
||||||
})
|
})
|
||||||
|
|
||||||
const edgeHidden = (e: GraphEdge, source?: GraphNode, target?: GraphNode) => {
|
const edgeVisible = (e: GraphEdge, source?: GraphNode, target?: GraphNode) => {
|
||||||
source = source ?? getNode.value(e.source)
|
source = source ?? getNode.value(e.source)
|
||||||
target = target ?? getNode.value(e.target)
|
target = target ?? getNode.value(e.target)
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ export function useGetters(state: State, nodeIds: ComputedRef<string[]>, edgeIds
|
|||||||
const edges: GraphEdge[] = []
|
const edges: GraphEdge[] = []
|
||||||
|
|
||||||
for (const edge of state.edges) {
|
for (const edge of state.edges) {
|
||||||
if (!edgeHidden(edge)) {
|
if (edgeVisible(edge)) {
|
||||||
edges.push(edge)
|
edges.push(edge)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user