Skip to content

Instantly share code, notes, and snippets.

@Pessimistress
Last active March 25, 2022 02:32
Show Gist options
  • Save Pessimistress/a869fbc61b03656aa0ac711c2d0513c1 to your computer and use it in GitHub Desktop.
Save Pessimistress/a869fbc61b03656aa0ac711c2d0513c1 to your computer and use it in GitHub Desktop.
MSAGL
<html>
<head>
<title>MSAGL</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
margin: 0;
overflow: hidden;
}
</style>
</head>
<body>
<script src="https://unpkg.com/@msagl/renderer@^0.0.17/dist.min.js"></script>
<script>
fetch('https://raw.githubusercontent.com/msaglJS/msagl-js/56814f6fefbd8347d490dd7a3aa48c61b3677035/test/data/graphvis/badvoro.gv')
.then(resp => resp.text())
.then(data => {
const graph = msagl.parseDot(data)
const renderer = new msagl.Renderer()
renderer.setGraph(graph)
const searchControl = new msagl.SearchControl()
renderer.addControl(searchControl)
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment