MCPcopy Create free account
hub / github.com/alibaba/lowcode-graph / getMindRecallEdges

Function getMindRecallEdges

packages/plugin-tools/src/common/utils.ts:168–184  ·  view source on GitHub ↗
(graph: G6.TreeGraph, node: G6.Node, edges: G6.Edge[] = [])

Source from the content-addressed store, hash-verified

166
167/** 获取回溯路径 - Mind */
168export 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

Calls 1

getMethod · 0.80

Tested by

no test coverage detected