Commit 3895d7a0 authored by Ryan Herbert's avatar Ryan Herbert

iindex.html main.js js include visu-separator

In order to place the separator between the two visu elements, create
the separator code in the javascript code, rather than have it hard
coded into the index.html file

See #3603
parent 0543ed1d
Pipeline #47659 failed with stages
in 16 seconds
...@@ -331,23 +331,6 @@ ...@@ -331,23 +331,6 @@
<!-- VISU-CONTAINER --> <!-- VISU-CONTAINER -->
<div id="visu-container"> <div id="visu-container">
<div id="visu-separator" >...
<div class="visu2_menu_anchor devel-mode">
<div class="visu2_menu">
<div class="visu2_menu_content">
<label for="visu2_mode_sp" onclick="switch_visu2('scatterplot')">
scatterplot
<input id="visu2_mode_sp" name="visu2_mode" type="radio"/>
</label>
<label for="visu2_mode_gr" onclick="switch_visu2('graph')">
graph
<input id="visu2_mode_gr" name="visu2_mode" type="radio" checked/>
</label>
</div>
mode
</div>
</div>
</div>
</div> </div>
</div> </div>
......
...@@ -51,6 +51,27 @@ var notification = new Notification(m) ...@@ -51,6 +51,27 @@ var notification = new Notification(m)
try { try {
var vmi = new VMI(); var vmi = new VMI();
vmi.setupDrawer(); vmi.setupDrawer();
/* use template to create DOM elements from string */
var template = document.createElement('template');
template.innerHTML = "<div id=\"visu-separator\" >...\
<div class=\"visu2_menu_anchor devel-mode\">\
<div class=\"visu2_menu\">\
<div class=\"visu2_menu_content\">\
<label for=\"visu2_mode_sp\" onclick=\"switch_visu2('scatterplot')\">\
scatterplot\
<input id=\"visu2_mode_sp\" name=\"visu2_mode\" type=\"radio\"/>\
</label>\
<label for=\"visu2_mode_gr\" onclick=\"switch_visu2('graph')\">\
graph\
<input id=\"visu2_mode_gr\" name=\"visu2_mode\" type=\"radio\" checked/>\
</label>\
</div>\
mode\
</div>\
</div>\
</div>";
var separator = template.content.firstChild;
var panel_instructions = [{'mid-container': ["left-container", "visu-container"]},"bot-container"]; var panel_instructions = [{'mid-container': ["left-container", "visu-container"]},"bot-container"];
vmi.setupPanels(panel_instructions, document.body); vmi.setupPanels(panel_instructions, document.body);
...@@ -58,6 +79,7 @@ try { ...@@ -58,6 +79,7 @@ try {
vmi.addView("info", "left-container", ""); vmi.addView("info", "left-container", "");
vmi.addView("list", "left-container", ""); vmi.addView("list", "left-container", "");
vmi.addView("visu2", "visu-container", ""); vmi.addView("visu2", "visu-container", "");
document.getElementById("mid-container").appendChild(separator);
vmi.addView("visu", "visu-container", ""); vmi.addView("visu", "visu-container", "");
vmi.addView("segmenter", "bot-container", ""); vmi.addView("segmenter", "bot-container", "");
vmi.setOverlays(["info-row", "list-row", "data-row", "visu-container", "bot-container"]); vmi.setOverlays(["info-row", "list-row", "data-row", "visu-container", "bot-container"]);
......
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