(index: number)
| 281 | } |
| 282 | function selectPath(index: number) { setPathIndex(index); setStepIndex(0); setSelection(undefined); } |
| 283 | function selectStep(index: number) { |
| 284 | if (!path?.nodes[index]) return; |
| 285 | setStepIndex(index); |
| 286 | const found = model.nodes.find(item => item.depth === index && item.pathIndices?.includes(activePathIndex)) |
| 287 | ?? model.nodes.find(item => item.componentIds?.includes(path.nodes[index].component_id) || item.id === path.nodes[index].group_id); |
| 288 | setSelection(data?.overview ? undefined : found ? { node: found.id } : undefined); selectSymbol(path.nodes[index]); |
| 289 | } |
| 290 | function selectEdge(id: string) { |
| 291 | const found = model.edges.find(item => item.id === id); |
| 292 | const nextPath = found?.pathIndices?.includes(activePathIndex) ? activePathIndex : found?.pathIndices?.[0] ?? activePathIndex; |
no test coverage detected