From afbf38108478af65a38223f214cbb9d7a8c60c28 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Sun, 24 Nov 2024 14:36:44 -0500 Subject: [PATCH] Pass query through viewer links between modes --- .../components/viewer/AnnotationLayer.svelte | 4 ++-- src/lib/components/viewer/Page.svelte | 6 ++++- .../components/viewer/ReadingToolbar.svelte | 7 ++++-- src/lib/utils/tests/viewer.test.ts | 4 ++-- src/lib/utils/viewer.ts | 22 ++++++++++++++----- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/lib/components/viewer/AnnotationLayer.svelte b/src/lib/components/viewer/AnnotationLayer.svelte index 3f313bb1b..45fe77f44 100644 --- a/src/lib/components/viewer/AnnotationLayer.svelte +++ b/src/lib/components/viewer/AnnotationLayer.svelte @@ -14,8 +14,10 @@ Assumes it's a child of a ViewerContext import { invalidate, pushState } from "$app/navigation"; + import { fly } from "svelte/transition"; import { _ } from "svelte-i18n"; + import Note from "./Note.svelte"; import EditNote from "../forms/EditNote.svelte"; import NoteTab from "./NoteTab.svelte"; @@ -31,8 +33,6 @@ Assumes it's a child of a ViewerContext isEmbedded, } from "$lib/components/viewer/ViewerContext.svelte"; import { getNotes, getViewerHref } from "$lib/utils/viewer"; - import Note from "./Note.svelte"; - import { fly } from "svelte/transition"; export let scale = 1.5; export let page_number: number; // zero-indexed diff --git a/src/lib/components/viewer/Page.svelte b/src/lib/components/viewer/Page.svelte index c15c14fb7..d6a890d69 100644 --- a/src/lib/components/viewer/Page.svelte +++ b/src/lib/components/viewer/Page.svelte @@ -5,6 +5,8 @@ Assumes it's a child of a ViewerContext -->