Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/stores/subgraphNavigationStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export const useSubgraphNavigationStore = defineStore(
/** Apply a viewport state to the canvas. */
function applyViewport(viewport: DragAndScaleState): void {
const canvas = app.canvas
if (!canvas) return
canvas.ds.scale = viewport.scale
canvas.ds.offset[0] = viewport.offset[0]
canvas.ds.offset[1] = viewport.offset[1]
Expand Down Expand Up @@ -170,7 +169,8 @@ export const useSubgraphNavigationStore = defineStore(
if (!isWorkflowSwitching) {
if (prevSubgraph) {
saveViewport(prevSubgraph.id)
} else if (!prevSubgraph && subgraph) {
}
if (!prevSubgraph && subgraph) {
saveViewport(getCurrentRootGraphId())
}
}
Expand Down
Loading