From 41ca2123ba9c0f372fe54457272d1e6165ef579a Mon Sep 17 00:00:00 2001 From: Max Richter Date: Thu, 25 Apr 2024 04:12:18 +0200 Subject: [PATCH] feat: make colors more stable --- app/src/lib/graph-interface/graph/colors.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/lib/graph-interface/graph/colors.ts b/app/src/lib/graph-interface/graph/colors.ts index eb20ed4..993efcf 100644 --- a/app/src/lib/graph-interface/graph/colors.ts +++ b/app/src/lib/graph-interface/graph/colors.ts @@ -29,13 +29,16 @@ function updateColors() { lastStyle = hash; } -updateColors(); - export const colors = readable(store, set => { updateColors(); set(store); + setTimeout(() => { + updateColors(); + set(store); + }, 1000); + window.onload = function () { updateColors(); set(store) }; document.body.addEventListener("transitionstart", () => {