mirror of
https://github.com/aaronallen8455/graph-trace.git
synced 2024-08-15 11:20:26 +03:00
loading div
This commit is contained in:
parent
4043080852
commit
8747fe00c4
@ -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
|
||||
|
@ -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 ()
|
||||
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user