From 8747fe00c4c7b9e9bf42291a276b5ba49ae348b5 Mon Sep 17 00:00:00 2001 From: Aaron Allen Date: Wed, 8 Dec 2021 12:31:39 -0600 Subject: [PATCH] loading div --- graph-trace-dot/src/Graph/Trace/Dot.hs | 2 +- graph-trace-viz/app/Main.hs | 7 +++++-- graph-trace-viz/extras/header.html | 29 +++++++++++++++++++++++++- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/graph-trace-dot/src/Graph/Trace/Dot.hs b/graph-trace-dot/src/Graph/Trace/Dot.hs index fa53773..2e0b66f 100644 --- a/graph-trace-dot/src/Graph/Trace/Dot.hs +++ b/graph-trace-dot/src/Graph/Trace/Dot.hs @@ -220,7 +220,7 @@ graphToDot graph = header <> graphContent <> "}" Just $ quoted (keyStr key) <> ":" <> BSB.wordDec idx <> " -> " <> quoted (keyStr edgeKey) - <> " [colorscheme=set28 color=" <> color <> "];" + <> " [tooltip=\" \" colorscheme=set28 color=" <> color <> "];" in ( el : cs , maybe id (:) mEdge es diff --git a/graph-trace-viz/app/Main.hs b/graph-trace-viz/app/Main.hs index b737045..a175235 100644 --- a/graph-trace-viz/app/Main.hs +++ b/graph-trace-viz/app/Main.hs @@ -54,8 +54,9 @@ writeSvg htmlFile dotContent = Proc.withCreateProcess (Proc.proc "dot" ["-Tsvg"]) { Proc.std_in = Proc.CreatePipe , Proc.std_out = Proc.CreatePipe - } $ - \(Just stdIn) (Just stdOut) _ _ -> do + } go + where + go (Just stdIn) (Just stdOut) _ _ = do hSetBinaryMode stdIn True hSetBuffering stdIn (BlockBuffering Nothing) hSetBinaryMode stdOut True @@ -65,3 +66,5 @@ writeSvg htmlFile dotContent = svg <- BSL.hGetContents stdOut BSL.hPut htmlFile svg hClose stdOut + go _ _ _ _ = pure () + diff --git a/graph-trace-viz/extras/header.html b/graph-trace-viz/extras/header.html index 7cd45ef..cb1ae56 100644 --- a/graph-trace-viz/extras/header.html +++ b/graph-trace-viz/extras/header.html @@ -49,9 +49,36 @@ window.onload = function () { scrollToPosition(firstNodePos.x, firstNodePos.y); } - console.log("Finished loading"); + document.getElementsByClassName("loading-backdrop")[0].remove(); }; + +
+
Loading...
+