mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-17 08:41:40 +00:00
some minor changes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9f3c18660a
commit
635a220308
@ -126,7 +126,7 @@ function openPanel(panel){
|
|||||||
if(panel.length == 0){
|
if(panel.length == 0){
|
||||||
if(title in PANELS){
|
if(title in PANELS){
|
||||||
var builder = PANELS[title]
|
var builder = PANELS[title]
|
||||||
panel = builder(null, true)
|
panel = builder({ open: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
// show/open the panel and all it's parents...
|
// show/open the panel and all it's parents...
|
||||||
@ -188,6 +188,8 @@ function removePanel(panel){
|
|||||||
// either revert or create a new panel
|
// either revert or create a new panel
|
||||||
// does:
|
// does:
|
||||||
// drops to last placeholder
|
// 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){
|
function makePanel(title, parent, open, keep_empty, close_button){
|
||||||
title = title == null || title.trim() == '' ? ' ' : title
|
title = title == null || title.trim() == '' ? ' ' : title
|
||||||
close_button = close_button == null ? true : false
|
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...
|
// an existing element will be returned...
|
||||||
function makePanelController(title, content_builder, panel_setup, content_resizable){
|
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...
|
// 1) search for panel and return it if it exists...
|
||||||
var panel = getPanel(title)
|
var panel = getPanel(title)
|
||||||
|
|
||||||
@ -484,6 +490,8 @@ function makePanelController(title, content_builder, panel_setup, content_resiza
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX set panel position, size, ...
|
||||||
|
|
||||||
return panel
|
return panel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user