From 76d0d27f65c90a5b50ec738c24abb7bd9b2020f0 Mon Sep 17 00:00:00 2001 From: Liliana Sanfilippo <liliana.sanfilippo@uni-bielefeld.de> Date: Mon, 23 Sep 2024 20:31:31 +0200 Subject: [PATCH] open them --- src/sidebars/engS.tsx | 8 ++++---- src/utils/openThem.ts | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sidebars/engS.tsx b/src/sidebars/engS.tsx index 5f5f743c..7b96653a 100644 --- a/src/sidebars/engS.tsx +++ b/src/sidebars/engS.tsx @@ -11,13 +11,13 @@ export function EngSide(){ }, []); const handleScroll = () => { for(let idx in nums){ - console.log("We are looking at 'item' = " + nums[idx]) + /* console.log("We are looking at 'item' = " + nums[idx]) */ const item = nums[idx]; let ind = nums.findIndex((e) => e == item) - console.log("ind is: " + ind) + /* console.log("ind is: " + ind) */ let subdi = "subtitle" + ind - console.log("subdi is: " + subdi) - console.log("we use " + document.getElementById(item)?.id + " and " + document.getElementById(subdi)?.id) + /* console.log("subdi is: " + subdi) + console.log("we use " + document.getElementById(item)?.id + " and " + document.getElementById(subdi)?.id) */ NewHighlight({el: document.getElementById(item)!}, {subtitle: document.getElementById(subdi)!}); } console.log("function HighlightCheck") diff --git a/src/utils/openThem.ts b/src/utils/openThem.ts index e23e702d..02ed3add 100644 --- a/src/utils/openThem.ts +++ b/src/utils/openThem.ts @@ -37,6 +37,7 @@ function updateTabs(it: string, scrollToId?: string) { // Scrolle zu der angegebenen ID, falls vorhanden if (scrollToId && document.getElementById(scrollToId)) { document.getElementById(scrollToId)!.scrollIntoView({ behavior: "smooth" }); + console.log(`Scroll to ${scrollToId}`) } } -- GitLab