Commit f7e25c88 authored by Téo Vasseur's avatar Téo Vasseur

js : chosen panel becomes default

See #2529
parent 7527520c
......@@ -37,8 +37,9 @@ function Heavy(id, parentId) {
for (var i = 0 ; i < 10000 ; i++) this.node.appendChild(document.createElement('span'));
}
function setView(view, parentId) {
document.getElementById(parentId).appendChild(view.node);
function setView(view, panel) {
if (panel) view.parentId = panel;
document.getElementById(view.parentId).appendChild(view.node);
}
function viewSelector(view) {
......@@ -51,9 +52,7 @@ function viewSelector(view) {
}
function viewSetter(view) {
var f = function () {
setView(view, view.parentId)
}
var f = function() {setView(view)};
return f;
}
......
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