From 433e9abbce58d5870cdc6119e64782b6b342bd74 Mon Sep 17 00:00:00 2001 From: Bram Kreulen Date: Tue, 26 Nov 2024 14:29:36 +0100 Subject: [PATCH] change find graph to center graph --- src/lib/scripts/svg/GraphSVG.ts | 2 +- src/routes/app/course/[course]/[link]/+page@.svelte | 4 ++-- src/routes/app/course/[course]/overview/GraphPreview.svelte | 4 ++-- src/routes/app/graph/[graph]/editor/GraphEditor.svelte | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) 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