| 144 | onRequest(next, destination, { ...(origin && origin.id !== next?.id ? { from: origin } : {}), ...(targetName ? { targetName } : {}) }); |
| 145 | } |
| 146 | function selectNode(id: string) { |
| 147 | setOverview(false); |
| 148 | const node = allNodes.find(item => item.id === id); |
| 149 | setSelection({ node: id }); |
| 150 | if (path && node?.depth !== undefined) changePlace({ step: node.depth }); |
| 151 | if (!path && node) changePlace({ page: Math.max(0, Math.floor((allNodes.indexOf(node) - 1) / 4)) }); |
| 152 | if (node?.symbol) onSelectSymbol(node.symbol); |
| 153 | } |
| 154 | function selectEdge(id: string) { |
| 155 | setOverview(false); |
| 156 | const edge = journey?.scene.edges.find(item => item.id === id); |