diff --git a/src/lib/scripts/svg/GraphSVG.ts b/src/lib/scripts/svg/GraphSVG.ts index 9ebbd32..02af9c2 100644 --- a/src/lib/scripts/svg/GraphSVG.ts +++ b/src/lib/scripts/svg/GraphSVG.ts @@ -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 diff --git a/src/routes/app/course/[course]/[link]/+page@.svelte b/src/routes/app/course/[course]/[link]/+page@.svelte index 08eb5fe..f6f8a04 100644 --- a/src/routes/app/course/[course]/[link]/+page@.svelte +++ b/src/routes/app/course/[course]/[link]/+page@.svelte @@ -106,8 +106,8 @@ options={graph.lecture_options} /> - diff --git a/src/routes/app/course/[course]/overview/GraphPreview.svelte b/src/routes/app/course/[course]/overview/GraphPreview.svelte index 425348d..8b92bd9 100644 --- a/src/routes/app/course/[course]/overview/GraphPreview.svelte +++ b/src/routes/app/course/[course]/overview/GraphPreview.svelte @@ -66,8 +66,8 @@ options={graph.lecture_options} /> - + on:click={() => graphSVG.centerGraph()} + > Center Graph