mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
notes
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2e8150c5bb
commit
c5ea87c015
@ -286,6 +286,23 @@ var callItemEventHandlers = function(item, event, evt, ...args){
|
|||||||
// - handle .stopPropagation(..) correnctly
|
// - handle .stopPropagation(..) correnctly
|
||||||
// - stop propagation up but finish the level???
|
// - stop propagation up but finish the level???
|
||||||
// - trigger the root.parent's event when done
|
// - 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){
|
var makeItemEventMethod = function(event, handler, options){
|
||||||
options = Object.assign(
|
options = Object.assign(
|
||||||
// NOTE: we need to be able to pass item objects, so we can not
|
// NOTE: we need to be able to pass item objects, so we can not
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user