-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
71 lines (55 loc) · 2.69 KB
/
demo.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
<!doctype html>
<html>
<head>
<title>Demonstration</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="https://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js"></script>
<script src="js/spectrum-viewer.js"></script>
<!-- Temp css -->
<style>
table, th, td {
border: 1px solid lightGrey;
border-collapse: collapse;
}
</style>
</head>
<body>
<div class="spectra"></div>
<table>
<caption>Spectras</caption>
<tr>
<th>Spectra 1</th>
<th>Spectra 2</th>
</tr>
<tr>
<td><button type="button" onclick="showSpectrum('spectra','spectra1','data/17mix_test2/453-1163-TLEDQVSELK.json', 0.5);">1163: TLEDQVSELK</button></td>
<td><button type="button" onclick="showSpectrum('spectra','spectra2','data/17mix_test2/374-1064-TNFDAFPDK.json', 0.5);">Original File: TNFDAFPDK</button></td>
<td><button type="button" onclick="showSpectrum('spectra','spectra3','data/17mix_test2/374-1064-TNFDAFPDK.json', 0.5);">Original File: TNFDAFPDK</button></td>
</tr>
<tr>
<td><button type="button" onclick="showSpectrum('spectra','spectra1','data/17mix_test2/723-1524-VLYPNDNFFEGK.json', 0.5);">Other Thing: VLYPNDNFFEGK</button></td>
<td><button type="button" onclick="showSpectrum('spectra','spectra2','data/17mix_test2/333-1006-ENQSILITGESGAGK.json', 0.5);">Some Other Thing: ENQSILITGESGAGK</button></td>
</tr>
<tr>
<td><button type="button" onclick="showSpectrum('spectra','spectra1','data/17mix_test2/519-1255-DTQVVLAM_oPYDTPVPGYR.json', 0.5);">Something: DTQVVLAM_oPYDTPVPGYR</button></td>
<td><button type="button" onclick="showSpectrum('spectra','spectra2','data/17mix_test2/533-1275-DWENPGVTQLNR.json', 0.5);">Something else: DWENPGVTQLNR</button></td>
</tr>
</table>
<ul>
<!-- <li><button type="button" onclick="setSpectraDomain(spectra-spectra1)"> bebe</button></li> -->
<li><button type="button" onclick="deleteSpectrum('spectra','spectra1');">Deletes Spectra1</button></li>
<li><button type="button" onclick="deleteSpectrum('spectra','spectra2');">Deletes Spectra2</button></li>
</ul>
<script type="text/javascript">
appendSpectrum("spectra", "spectra1", 1000, 400);
appendSpectrum("spectra", "spectra2", 1000, 400);
appendSpectrum("spectra", "spectra3", 1000, 400);
//loads two spectra
showSpectrum('spectra','spectra1','data/17mix_test2/453-1163-TLEDQVSELK.json', 0.5);
showSpectrum('spectra','spectra2','data/17mix_test2/374-1064-TNFDAFPDK.json', 0.5);
showSpectrum('spectra','spectra3','data/17mix_test2/374-1064-TNFDAFPDK.json', 0.5);
</script>
</body>
</html>