From 7b5e0134e5aabf786388d4ab5db513a014be083a Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Fri, 25 Dec 2020 21:49:56 +0100 Subject: [PATCH] Make spinner's position sticky in relation to graphsContainer --- ts/graphs/GraphsPage.svelte | 42 ++++++++++++++++++++++++------------- ts/graphs/graphs.scss | 5 ++++- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/ts/graphs/GraphsPage.svelte b/ts/graphs/GraphsPage.svelte index 666ed065e..1f9c3c1ce 100644 --- a/ts/graphs/GraphsPage.svelte +++ b/ts/graphs/GraphsPage.svelte @@ -3,7 +3,8 @@ -{/await} +
+ {#await dataPromise} +
+ {:then sourceData} + {#each graphs as Graph} + + {/each} + {:catch error} + + {/await} +
diff --git a/ts/graphs/graphs.scss b/ts/graphs/graphs.scss index 01e7719f0..fd5bf9d8a 100644 --- a/ts/graphs/graphs.scss +++ b/ts/graphs/graphs.scss @@ -144,7 +144,10 @@ } .spin { - position: absolute; + position: sticky; + left: 50%; + top: 50%; + animation: spin; animation-duration: 1s; animation-iteration-count: infinite;