now we update only the affected elements...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-09-10 03:27:19 +03:00
parent ff28293b87
commit 6bb254d6a6

View File

@ -4592,6 +4592,7 @@ module.HTMLRenderer = {
// </div>
//
// XXX add support for headless nested blocks...
// XXX HACK -- see inside...
nest: function(header, lst, index, path, options){
var that = this
@ -4635,7 +4636,6 @@ module.HTMLRenderer = {
e.appendChild(item) })
: null
// reattach the item to DOM...
// XXX HACK: see notes for .elem assignment below and in renderer.elem(..)
old
@ -5236,23 +5236,14 @@ var HTMLBrowserPrototype = {
// element up to reveal the expanded subtree...
// ...would also be logical to "show" the expanded tree but
// 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() },
__collapse__: function(evt, elem){ elem.update() },
//*/
__select__: updateElemClass('add', 'selected'),
__deselect__: updateElemClass('remove', 'selected'),
// XXX would be more logical to update only the sepcific elements...
__disable__: updateElemClass('add', 'disabled', function(){ this.update() }),
__enable__: updateElemClass('remove', 'disabled', function(){ this.update() }),
__disable__: updateElemClass('add', 'disabled',
function(evt, elem){ elem.update() }),
__enable__: updateElemClass('remove', 'disabled',
function(evt, elem){ elem.update() }),
__hide__: updateElemClass('add', 'hidden'),
__show__: updateElemClass('remove', 'hidden'),