mirror of
https://github.com/aaronallen8455/graph-trace.git
synced 2024-09-17 11:57:21 +03:00
loading div
This commit is contained in:
parent
4043080852
commit
8747fe00c4
@ -220,7 +220,7 @@ graphToDot graph = header <> graphContent <> "}"
|
|||||||
Just $
|
Just $
|
||||||
quoted (keyStr key) <> ":" <> BSB.wordDec idx
|
quoted (keyStr key) <> ":" <> BSB.wordDec idx
|
||||||
<> " -> " <> quoted (keyStr edgeKey)
|
<> " -> " <> quoted (keyStr edgeKey)
|
||||||
<> " [colorscheme=set28 color=" <> color <> "];"
|
<> " [tooltip=\" \" colorscheme=set28 color=" <> color <> "];"
|
||||||
|
|
||||||
in ( el : cs
|
in ( el : cs
|
||||||
, maybe id (:) mEdge es
|
, maybe id (:) mEdge es
|
||||||
|
@ -54,8 +54,9 @@ writeSvg htmlFile dotContent =
|
|||||||
Proc.withCreateProcess (Proc.proc "dot" ["-Tsvg"])
|
Proc.withCreateProcess (Proc.proc "dot" ["-Tsvg"])
|
||||||
{ Proc.std_in = Proc.CreatePipe
|
{ Proc.std_in = Proc.CreatePipe
|
||||||
, Proc.std_out = Proc.CreatePipe
|
, Proc.std_out = Proc.CreatePipe
|
||||||
} $
|
} go
|
||||||
\(Just stdIn) (Just stdOut) _ _ -> do
|
where
|
||||||
|
go (Just stdIn) (Just stdOut) _ _ = do
|
||||||
hSetBinaryMode stdIn True
|
hSetBinaryMode stdIn True
|
||||||
hSetBuffering stdIn (BlockBuffering Nothing)
|
hSetBuffering stdIn (BlockBuffering Nothing)
|
||||||
hSetBinaryMode stdOut True
|
hSetBinaryMode stdOut True
|
||||||
@ -65,3 +66,5 @@ writeSvg htmlFile dotContent =
|
|||||||
svg <- BSL.hGetContents stdOut
|
svg <- BSL.hGetContents stdOut
|
||||||
BSL.hPut htmlFile svg
|
BSL.hPut htmlFile svg
|
||||||
hClose stdOut
|
hClose stdOut
|
||||||
|
go _ _ _ _ = pure ()
|
||||||
|
|
||||||
|
@ -49,9 +49,36 @@ window.onload = function () {
|
|||||||
scrollToPosition(firstNodePos.x, firstNodePos.y);
|
scrollToPosition(firstNodePos.x, firstNodePos.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Finished loading");
|
document.getElementsByClassName("loading-backdrop")[0].remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="loading-backdrop">
|
||||||
|
<div class="loading-modal">Loading...</div>
|
||||||
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user