From 635a220308878fc5fc8df6b1ff174adf6c3e71ee Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 5 Jan 2014 23:31:33 +0400 Subject: [PATCH] some minor changes... Signed-off-by: Alex A. Naanou --- ui/lib/panels.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/lib/panels.js b/ui/lib/panels.js index bc573cc8..a931882c 100755 --- a/ui/lib/panels.js +++ b/ui/lib/panels.js @@ -126,7 +126,7 @@ function openPanel(panel){ if(panel.length == 0){ if(title in PANELS){ var builder = PANELS[title] - panel = builder(null, true) + panel = builder({ open: true }) } // show/open the panel and all it's parents... @@ -188,6 +188,8 @@ function removePanel(panel){ // either revert or create a new panel // does: // drops to last placeholder +// XXX need to stop this triggering panelClosing event when the last +// panel is dragged out or when the panel is dragged... function makePanel(title, parent, open, keep_empty, close_button){ title = title == null || title.trim() == '' ? ' ' : title close_button = close_button == null ? true : false @@ -455,7 +457,11 @@ function makeSubPanel(title, content, parent, open, content_resizable){ // an existing element will be returned... function makePanelController(title, content_builder, panel_setup, content_resizable){ - var controller = function(parent, open){ + var controller = function(state){ + state = state == null ? {} : state + var parent = state.parent + var open = state.open + // 1) search for panel and return it if it exists... var panel = getPanel(title) @@ -484,6 +490,8 @@ function makePanelController(title, content_builder, panel_setup, content_resiza } } + // XXX set panel position, size, ... + return panel }