diff --git a/src/routes/school/css/+page.svelte b/src/routes/school/css/+page.svelte index 5a24081..e29426e 100644 --- a/src/routes/school/css/+page.svelte +++ b/src/routes/school/css/+page.svelte @@ -23,6 +23,7 @@ } let currentCountry: string = ""; + let currentCountrySelected: string = ""; let interactiveEmbed: HTMLIFrameElement; function selectCountry(country: string, towards: boolean) { @@ -33,10 +34,16 @@ (towards ? "in" : "out") + ".html"; - interactiveEmbed.scrollIntoView({ - behavior: "smooth", - block: "start", - }); + currentCountrySelected = towards + ? "Others towards " + getCountryName(country) + : getCountryName(country) + "'s opinion of others"; + + setTimeout(() => { + interactiveEmbed.scrollIntoView({ + behavior: "smooth", + block: "end", + }); + }, 200); } function getCountryName(code) { @@ -65,7 +72,7 @@ }); -
+

Computational Social Science

@@ -129,7 +136,11 @@
-
+
+
{currentCountrySelected}