-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
46 lines (42 loc) · 1.5 KB
/
test.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
<!doctype html>
<html>
<head>
<title>Test</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/spectrum-viewer.css" type="text/css"></link>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<script src="http://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js"></script>
<script src="js/spectrum-viewer.js"></script>
<script type="text/javascript">
var width = 1000;
var height = 300;
var tol = 0.05;
var ss = {};
function showSpec(panel,tag,path) {
var key = panel+'_'+tag;
if (!ss[key]) {
appendSpectrum(panel, tag, width, height);
ss[key] = true;
}
showSpectrum(panel, tag, path, tol);
}
function delSpec(panel,tag) {
deleteSpectrum(panel, tag);
var key = panel+'_'+tag;
ss[key] = false;
}
</script>
</head>
<body>
<div class="specpanel1"></div>
<div class="specpanel2"></div>
<script type="text/javascript">
showSpec('specpanel1','spec2','data/17mix_test2/711-1508-LITAIGDVVNHDPVVGDR.json');
showSpec('specpanel1','spec1','data/17mix_test2/466-1180-VDEDQPFPAVPK.json');
showSpec('specpanel2','spec1','data/17mix_test2/669-1455-HADSVAELGEQIDNLQR.json');
delSpec('specpanel1','spec2');
// showSpec('specpanel1','spec1','data/17mix_test2/466-1180-VDEDQPFPAVPK.json');
showSpec('specpanel1','spec2','data/17mix_test2/711-1508-LITAIGDVVNHDPVVGDR.json');
</script>
</body>
</html>