Skip to content
This repository has been archived by the owner on Feb 21, 2025. It is now read-only.

Commit

Permalink
change find graph to center graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluerberry committed Nov 26, 2024
1 parent 6543a3c commit 433e9ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib/scripts/svg/GraphSVG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ class GraphSVG {
.call(this.zoom.scaleBy, 1 / settings.ZOOM_STEP)
}

findGraph() {
centerGraph() {
if (this.state !== SVGState.dynamic && this.state !== SVGState.static) return

this.state = SVGState.animating
Expand Down
4 changes: 2 additions & 2 deletions src/routes/app/course/[course]/[link]/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
options={graph.lecture_options}
/>

<Button on:click={() => graphSVG.findGraph()}>
Find Graph
<Button on:click={() => graphSVG.centerGraph()}>
Center Graph
</Button>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/app/course/[course]/overview/GraphPreview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
options={graph.lecture_options}
/>

<Button on:click={() => graphSVG.findGraph()}>
Find Graph
<Button on:click={() => graphSVG.centerGraph()}>
Center Graph
</Button>

<button class="exit" on:click={hide}>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/app/graph/[graph]/editor/GraphEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@
/>

<Button
on:click={() => graphSVG.findGraph()}
> Find Graph </Button>
on:click={() => graphSVG.centerGraph()}
> Center Graph </Button>

<Button
on:click={() => {
Expand Down

0 comments on commit 433e9ab

Please sign in to comment.