-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
92 lines (83 loc) · 2.25 KB
/
Copy pathindex.html
File metadata and controls
92 lines (83 loc) · 2.25 KB
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
<html>
<head>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://d3js.org/d3-dsv.v1.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://vega.github.io/vega/vega.min.js"></script>
<script src="node_modules/mathjs/dist/math.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js" type="text/javascript" charset="utf-8"></script>
<style>
th, td {
border: 1px solid;
}
#repl {
float: left;
min-width: 400px;
min-height: 600px;
/*border: 1px dashed;*/
padding: 5px;
}
#show-panel {
float: left;
margin-left: 20px;
min-width: 600px;
min-height: 600px;
border: 1px dashed;
padding: 5px;
}
#vis {
min-height: 300px;
border: 1px dashed;
}
#table-area {
min-height: 300px;
border: 1px dashed;
}
#submitted {
min-height: 580px;
}
#inputs {
text-align: center;
}
#editor {
position: absolute;
top: 5px;
right: 0;
bottom: 0;
left: 5px;
width: 400px;
height: 550px;
}
</style>
</head>
<body>
<div id="repl">
<div id="submitted">
</div>
<div id="inputs">
<div id="editor"></div>
<button id="run">Run</button>
</div>
</div>
<div id="show-panel">
<div id="vis"></div>
<div id="table-area"></div>
</div>
</body>
<footer>
<script src="out/bundle.js"></script>
<script>
$(document).ready(function() {
var editor = ace.edit("editor");
editor.setTheme("ace/theme/chrome");
editor.getSession().setMode("ace/mode/javascript");
$('#run').click(function() {
$('#vis').html('');
$('#table-area').html('');
var code = editor.getValue();
eval(code);
});
});
</script>
</footer>
</html>