mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 19:00:09 +00:00
subPanelRemoved is triggered on every sort and not only when panel is removed -- need to fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
5e23120e87
commit
4fbfb5b554
@ -26,8 +26,10 @@ var PANELS = {
|
|||||||
|
|
||||||
// - start monitoring where we are dragged to...
|
// - start monitoring where we are dragged to...
|
||||||
// - open hidden side panels...
|
// - open hidden side panels...
|
||||||
|
// XXX store number of panels we started with...
|
||||||
function _startSortHandler(e, ui){
|
function _startSortHandler(e, ui){
|
||||||
ui.item.data('isoutside', false)
|
ui.item.data('isoutside', false)
|
||||||
|
ui.item.data('sub-panels-before', $(this).find('.sub-panel').length)
|
||||||
ui.placeholder
|
ui.placeholder
|
||||||
.height(ui.helper.outerHeight())
|
.height(ui.helper.outerHeight())
|
||||||
.width(ui.helper.outerWidth())
|
.width(ui.helper.outerWidth())
|
||||||
@ -269,6 +271,14 @@ function makePanel(title, parent, open, keep_empty, close_button){
|
|||||||
wrapWithPanel(ui.item, panel.parent(), ui.offset)
|
wrapWithPanel(ui.item, panel.parent(), ui.offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* XXX this does not work right...
|
||||||
|
if(ui.item.data('sub-panels-before') < panel.find('.sub-panel').length){
|
||||||
|
console.log('!!!!')
|
||||||
|
panel.trigger('subPanelRemoved')
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// XXX need to trigger this ONLY of a panel was removed...
|
||||||
|
// ...check if number of panels changed...
|
||||||
panel.trigger('subPanelRemoved')
|
panel.trigger('subPanelRemoved')
|
||||||
|
|
||||||
_resetSidePanels()
|
_resetSidePanels()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user