diff --git a/packages/client/src/components/graph/GraphNavbar.vue b/packages/client/src/components/graph/GraphNavbar.vue index 5cb9908e4..257d64d19 100644 --- a/packages/client/src/components/graph/GraphNavbar.vue +++ b/packages/client/src/components/graph/GraphNavbar.vue @@ -12,17 +12,61 @@ const selectableItems = [ ] as const const filterId = graphFilterNodeId + +// Pathfinding mode +const pathfindingMode = graphPathfindingMode +const pathfindingStart = graphPathfindingStart +const pathfindingEnd = graphPathfindingEnd +const nodesCount = graphNodeCount +const edgesCount = graphEdgeCount + +function togglePathfindingMode() { + pathfindingMode.value = !pathfindingMode.value + if (!pathfindingStart.value && text.value) { + pathfindingStart.value = text.value + } +} + +function swapStartAndEnd() { + const start = pathfindingStart.value + pathfindingStart.value = pathfindingEnd.value + pathfindingEnd.value = start +}