Function
getMindRecallEdges
(graph: G6.TreeGraph, node: G6.Node, edges: G6.Edge[] = [])
Source from the content-addressed store, hash-verified
| 166 | |
| 167 | /** 获取回溯路径 - Mind */ |
| 168 | export function getMindRecallEdges(graph: G6.TreeGraph, node: G6.Node, edges: G6.Edge[] = []) { |
| 169 | const parentNode = node.get('parent'); |
| 170 | |
| 171 | if (!parentNode) { |
| 172 | return edges; |
| 173 | } |
| 174 | |
| 175 | node.getEdges().forEach(edge => { |
| 176 | const sourceId = edge.getModel().source; |
| 177 | |
| 178 | if (sourceId === parentNode.get('id')) { |
| 179 | edges.push(edge); |
| 180 | } |
| 181 | }); |
| 182 | |
| 183 | return getMindRecallEdges(graph, parentNode, edges); |
| 184 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected