From c5ea87c01511f525cbddcb7dc74f7d3b0bd7dae5 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 23 May 2019 04:20:59 +0300 Subject: [PATCH] notes Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse2.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index c7ed6c27..71abd254 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -286,6 +286,23 @@ var callItemEventHandlers = function(item, event, evt, ...args){ // - handle .stopPropagation(..) correnctly // - stop propagation up but finish the level??? // - trigger the root.parent's event when done +// XXX Q: do we need item event grouping??? +// ...e.g. should .select('*') trigger a 'select' on each item and +// then on groups of contained items per container, or should it be +// triggered once per item per relevant container??? +// ....considering that I see no obvious way to implement grouping +// up the tree in a recursive manner I'm starting to think that we +// should go the simple route and trigger 1:1 from each leaf and up... +// NOTE: this approach would mean that .trigger(..) itself would NOT +// call any handlers on the current level, it would just propagate +// the event down, and the handlers would get called on the way +// back up (unless .stopPropagation(..) is called) +// NOTE: this would also make item and container events behave in +// a different manner: +// - container event calls handlers here and propagates up +// - item event propagates down then triggers container events up +// XXX how do we distinguish these (down/up) events??? +// ...different events, event state/mode, ...??? var makeItemEventMethod = function(event, handler, options){ options = Object.assign( // NOTE: we need to be able to pass item objects, so we can not