-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathload-from-file.html
44 lines (44 loc) · 1.5 KB
/
load-from-file.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
<html>
<head>
<title>Flapjack Bytes</title>
<meta charset="UTF-8">
</head>
<body>
<div>
<div>
<label for="mapfile">Map file:</label>
<input type="file" id="mapfile" name="mapfile">
</div>
<div>
<label for="genofile">Genotype file:</label>
<input type="file" id="genofile" name="genofile">
</div>
<div>
<label for="phenofile">Phenotype file:</label>
<input type="file" id="phenofile" name="phenofile">
</div>
<input type="submit" action="#" id="submit" name="submit" value="Submit">
</div>
<div id="canvas-holder">
<!-- Empty div that we can insert a canvas into from javascript. -->
</div>
<script src="build/flapjack-bytes.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(){
document.getElementById("submit").addEventListener("click", function(){
var renderer = GenotypeRenderer();
renderer.renderGenotypesFile({
domParent: "canvas-holder",
width: null, height: 600,
mapFileDom: "mapfile",
genotypeFileDom: "genofile",
phenotypeFileDom: "phenofile",
overviewWidth: null, overviewHeight: 200,
minGenotypeAutoWidth: 600, minGenotypeAutoHeight: 600,
});
return false;
});
});
</script>
</body>
</html>