loading div

This commit is contained in:
Aaron Allen 2021-12-08 12:31:39 -06:00
parent 4043080852
commit 8747fe00c4
3 changed files with 34 additions and 4 deletions

View File

@ -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

View File

@ -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 ()

View File

@ -49,9 +49,36 @@ window.onload = function () {
scrollToPosition(firstNodePos.x, firstNodePos.y);
}
console.log("Finished loading");
document.getElementsByClassName("loading-backdrop")[0].remove();
};
</script>
<style>
body {
margin: 0;
}
.loading-backdrop {
position: fixed;
width: 100%;
height: 100%;
background-color: #00000040;
}
.loading-modal {
padding: 30px;
text-align: center;
font-size: 1.5em;
background-color: white;
z-index: 1;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
position: absolute;
}
</style>
</head>
<body>
<div class="loading-backdrop">
<div class="loading-modal">Loading...</div>
</div>