From 7f2d9a2c2b8d45d86331055676e14c5ff9e8abc3 Mon Sep 17 00:00:00 2001 From: Fred Hohman Date: Fri, 14 Aug 2020 12:07:46 -0400 Subject: [PATCH] tap background to clear annotations #13 --- src/diagrams/details-illustration.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/diagrams/details-illustration.svelte b/src/diagrams/details-illustration.svelte index 6c757c5..a9ffc3b 100644 --- a/src/diagrams/details-illustration.svelte +++ b/src/diagrams/details-illustration.svelte @@ -25,6 +25,7 @@ onMount(() => { assignAnnotations() + tapBackgroundToHideAnnotation() }) afterUpdate(() => { @@ -66,6 +67,10 @@ showFakeImage() } + function tapBackgroundToHideAnnotation() { + document.getElementById('fake-image').onclick = () => changeAnnotationDisplay() + } + function hideFakeImage() { document.getElementById('fake-image').classList.add("hide")