Commit 4cac6d3a authored by Téo Vasseur's avatar Téo Vasseur

js : view removal controller in menu

parent 802335fe
Pipeline #3627 failed with stages
in 4 seconds
......@@ -14,9 +14,9 @@ function View(id, parentId, classes) {
node.className = "view " + classes;
node.id = id;
node.textContent = id;
node.onclick = function() {
this.parentNode.removeChild(this);
}
// node.onclick = function() {
// this.parentNode.removeChild(this);
// }
this.node = node;
// parent.appendChild(node);
......@@ -72,6 +72,16 @@ vmi.setMenuOptions = function() {
menu.appendChild(div);
}
div = document.createElement('div');
div.textContent = "X";
div.className = "editor";
div.onclick = function() {
var v = vmi.selectedView;
if (v) v.node.parentNode.removeChild(v.node);
vmi.hideEditors();
}
menu.appendChild(div);
}
vmi.hideEditors = function() {
......
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