forked from marcopasi/mugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mugin.html
48 lines (44 loc) · 2 KB
/
mugin.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<div id="data" style="height:500px">
<div id="graph">
<div id="filter" class="floatbox">
<h3>Filter links</h3>
<div id="filters">
</div>
</div>
<div id="graph_info" class="floatbox">
<div id="metadata">
</div>
<div id="toolbox" class="editing_GUI">
<span class="item add" title="Add Node"><a><i class="fa fa-plus fa-2x"></i></a></span>
<span class="item edit" title="Edit"><a><i class="fa fa-pencil fa-2x"></i></a></span>
<span class="item delete" title="Delete"><a><i class="fa fa-times fa-2x"></i></a></span>
<span class="item link" title="Add link"><a><i class="fa fa-link fa-2x"></i></a></span>
<span class="item cancel" title="Cancel"><a><i class="fa fa-arrow-circle-o-left fa-2x"></i></a></span>
<span class="item submit" title="Save"><a><i class="fa fa-floppy-o fa-2x"></i></a></span>
</div>
</div>
<div id="help" class="floatbox">
</div>
<script type="text/javascript">
var g = new GraphLayout("#graph", "mugdata.json");
var vg = new VGraph(g.graph, "#graph_info");
vg.register_callback(function(){g.update();});
g.on("node_click", function(node){vg.show(node, "node");});
g.on("link_click", function(link){vg.show(link, "link");});
make_filters("#filters", g);
g.register_tool(function(){$("#filter").toggle();}, "images/funnel.svg",
"Filter links (click to see options)");
$(document).ready( function() {
$("#help").load("help.html");
$("#help").click(hhide);
});
$(window).on("load", function() {
vg.update();
});
function htoggle() {$("#help").toggle();}
function hhide() {$("#help").hide();}
g.register_tool(htoggle, "images/help.svg", "Show help", 0);
</script>
</div>
<div id="debug"></div>
</div>