Commit 6bae88a8 authored by Téo Vasseur's avatar Téo Vasseur

js, html : setup HTML (panels) in js

parent 7c65e0a2
......@@ -25,23 +25,21 @@
<body>
<div id="menu"></div>
<!-- <div id="menu"></div>
<div id="panels">
<div id="AB" class="horizontal">
<div id="A" class="vertical panel"></div>
<!-- <div class="vertical separator"></div> -->
<div id="B" class="vertical panel"></div>
</div>
<!-- <div class="horizontal separator"></div> -->
<div id="C" class="horizontal panel"></div>
</div>
</div> -->
<script src="js/vmi.js"></script>
<script src="js/vmi_mocker.js"></script>
......
......@@ -104,3 +104,31 @@ vmi.setOverlays = function() {
setOverlay('B');
setOverlay('C');
}
vmi.setupHTML = function() {
var body = document.getElementsByTagName('body')[0];
var menu = document.createElement('div');
menu.id = "menu";
var panels = document.createElement('div');
panels.id = "panels";
var ab = document.createElement('div');
ab.id = "AB";
panels.appendChild(ab);
function panel(id) {
var div = document.createElement('div');
div.id = id;
div.className = "panel";
return div;
}
ab.appendChild(panel("A"));
ab.appendChild(panel("B"));
panels.appendChild(panel("C"));
body.appendChild(menu);
body.appendChild(panels);
}
\ No newline at end of file
......@@ -16,6 +16,8 @@ function Heavy(id, parentId) {
}
function main() {
vmi.setupHTML();
var v1 = new Flex("v1", 'A');
var v2 = new Flex("v2", 'A');
var v3 = new Flex("v3", 'B');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment