mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 12:56:11 +00:00
ca821e1064
First commit with the app code
44 lines
853 B
HTML
44 lines
853 B
HTML
<html>
|
|
<body>
|
|
<!--
|
|
<style type="text/css">
|
|
.center {
|
|
position: absolute;
|
|
left: 50%;
|
|
/* top: 50%; */
|
|
-webkit-transform: translate(-50%, 0);
|
|
transform: translate(-50%, 0);
|
|
}
|
|
</style>
|
|
-->
|
|
<div class="center" id="output"></div>
|
|
|
|
<script src="qrc:/html/viz.js"></script>
|
|
|
|
<script type="text/vnd.graphviz" id="test">
|
|
MEOW
|
|
</script>
|
|
|
|
<script>
|
|
|
|
function src(id) {
|
|
return document.getElementById(id).innerHTML;
|
|
}
|
|
|
|
var format = "svg";
|
|
var engine = "dot";
|
|
|
|
var result = Viz(src("test"), format, engine);
|
|
//var result = Viz(input, format, engine);
|
|
|
|
if (format == "svg") {
|
|
document.getElementById("output").innerHTML = result;
|
|
} else {
|
|
document.getElementById("output").innerHTML = "";
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|