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

js : double click to place view, single click sets to default panel

See #2530, "2529
parent bf92be8b
......@@ -45,6 +45,13 @@ function viewSelector(view) {
return f;
}
function viewSetter(view) {
var f = function () {
setView(view, view.parentId)
}
return f;
}
function setMenuOptions() {
var menu = document.getElementById("menu");
var div;
......@@ -52,8 +59,8 @@ function setMenuOptions() {
for (var i in views) {
div = document.createElement('div');
div.textContent = views[i].id;
// div.onclick = viewSetter(views[i], 'A');
div.onclick = viewSelector(views[i]);
div.onclick = viewSetter(views[i]);
div.ondblclick = viewSelector(views[i]);
menu.appendChild(div);
}
......
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