-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathcanviz.html
94 lines (86 loc) · 3.81 KB
/
canviz.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
This file is part of Canviz. See http://www.canviz.org/
$Id: new.html.in 256 2009-01-08 11:14:07Z ryandesign.com $
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="canviz-0.1/canviz.css" />
<title>Xprobe Object Graph</title>
<script type="text/javascript" src="canviz-0.1/prototype/prototype.js"></script>
<script type="text/javascript" src="canviz-0.1/path/path.js"></script>
<script type="text/javascript" src="canviz-0.1/canviz.js"></script>
<script>
var canviz;
document.observe('dom:loaded', function() {
canviz = new Canviz('canviz', 'canviz.gv?flush='+Math.random());
});
function sendClient(selector,pathID) {
prompt(selector,pathID)
}
function set_graph_scale(select) {
canviz.setScale(select.value);
canviz.draw();
window.scrollTo(0,0);
}
function click_node(node) {
sendClient( "open:", node );
}
function startEdge() {
var ctxScale = canviz.scale * canviz.dpi / 72;
canviz.ctx.save();
canviz.ctx.translate(canviz.padding, canviz.padding);
canviz.ctx.scale(ctxScale, ctxScale);
}
function colorEdge(eid,color) {
if ( edgePaths[eid] ) {
color = canviz.parseHexColor(color).canvasColor;
canviz.ctx.strokeStyle = color;
canviz.drawPath(canviz.ctx,edgePaths[eid],false,'solid');
canviz.ctx.fillStyle = color;
canviz.drawPath(canviz.ctx,edgeHeads[eid],true,'solid');
}
}
function stopEdge() {
canviz.ctx.restore();
}
window.onscroll = function() {
$('menus').style.left = document.body.scrollLeft+"px";
}
</script>
</head>
<body>
<div id="menus" style="position: relative;">
Graph Type:
<select name="graph_type" id="graph_type" onchange="sendClient('regraph:',this.value)">
<option value="0" selected>Normal Filtering</option>
<option value="0">Re-sweep Graph</option>
<option value="16">Simplify Graph</option>
<option value="1">No Array Limit</option>
<option value="3">Show Interlinks</option>
<option value="7">Draw "kit" objects</option>
<option value="15">Draw All Objects</option>
</select>
Scale Image:
<select name="graph_scale" id="graph_scale" onchange="set_graph_scale(this)">
<option value="1" selected>100%</option>
<option value="0.75">75%</option>
<option value="0.5">50%</option>
<option value="0.35">35%</option>
<option value="0.25">25%</option>
<option value="0.15">15%</option>
<option value="0.1">10%</option>
<option value="0.05">5%</option>
</select>
Animate Messages: <input type=checkbox onchange="sendClient('animate:',this.checked?1:0)">
You may need to scroll to the right to view objects ...
</div>
<div id="debug_output" style="display:none"></div>
<div class="graph">
<div id="canviz"></div>
</div>
</body>
</html>