mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
now we update only the affected elements...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ff28293b87
commit
6bb254d6a6
@ -4592,6 +4592,7 @@ module.HTMLRenderer = {
|
|||||||
// </div>
|
// </div>
|
||||||
//
|
//
|
||||||
// XXX add support for headless nested blocks...
|
// XXX add support for headless nested blocks...
|
||||||
|
// XXX HACK -- see inside...
|
||||||
nest: function(header, lst, index, path, options){
|
nest: function(header, lst, index, path, options){
|
||||||
var that = this
|
var that = this
|
||||||
|
|
||||||
@ -4635,7 +4636,6 @@ module.HTMLRenderer = {
|
|||||||
e.appendChild(item) })
|
e.appendChild(item) })
|
||||||
: null
|
: null
|
||||||
|
|
||||||
|
|
||||||
// reattach the item to DOM...
|
// reattach the item to DOM...
|
||||||
// XXX HACK: see notes for .elem assignment below and in renderer.elem(..)
|
// XXX HACK: see notes for .elem assignment below and in renderer.elem(..)
|
||||||
old
|
old
|
||||||
@ -5236,23 +5236,14 @@ var HTMLBrowserPrototype = {
|
|||||||
// element up to reveal the expanded subtree...
|
// element up to reveal the expanded subtree...
|
||||||
// ...would also be logical to "show" the expanded tree but
|
// ...would also be logical to "show" the expanded tree but
|
||||||
// keeping the focused elem in view...
|
// keeping the focused elem in view...
|
||||||
/* XXX there is a problem with .update() propagation up the nested
|
|
||||||
// dialogs -- we lose context...
|
|
||||||
// ...see .renderContext(..) / .renderFinalize(..) for details...
|
|
||||||
// There are two routs to make this uniform:
|
|
||||||
// 1) make some events (update) root-only
|
|
||||||
// 2) make local updates possible (connect .dom to parent's dom)
|
|
||||||
__expand__: function(){ this.update() },
|
|
||||||
__collapse__: function(){ this.update() },
|
|
||||||
/*/
|
|
||||||
__expand__: function(evt, elem){ elem.update() },
|
__expand__: function(evt, elem){ elem.update() },
|
||||||
__collapse__: function(evt, elem){ elem.update() },
|
__collapse__: function(evt, elem){ elem.update() },
|
||||||
//*/
|
|
||||||
__select__: updateElemClass('add', 'selected'),
|
__select__: updateElemClass('add', 'selected'),
|
||||||
__deselect__: updateElemClass('remove', 'selected'),
|
__deselect__: updateElemClass('remove', 'selected'),
|
||||||
// XXX would be more logical to update only the sepcific elements...
|
__disable__: updateElemClass('add', 'disabled',
|
||||||
__disable__: updateElemClass('add', 'disabled', function(){ this.update() }),
|
function(evt, elem){ elem.update() }),
|
||||||
__enable__: updateElemClass('remove', 'disabled', function(){ this.update() }),
|
__enable__: updateElemClass('remove', 'disabled',
|
||||||
|
function(evt, elem){ elem.update() }),
|
||||||
__hide__: updateElemClass('add', 'hidden'),
|
__hide__: updateElemClass('add', 'hidden'),
|
||||||
__show__: updateElemClass('remove', 'hidden'),
|
__show__: updateElemClass('remove', 'hidden'),
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user