From 6f2a15fa2db28f9feefa76e009124101564d2e24 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 25 May 2019 12:51:32 +0300 Subject: [PATCH] notes and experiments... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/widget/browse2.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ui (gen4)/lib/widget/browse2.js b/ui (gen4)/lib/widget/browse2.js index cb93342e..dd8085bb 100755 --- a/ui (gen4)/lib/widget/browse2.js +++ b/ui (gen4)/lib/widget/browse2.js @@ -302,6 +302,8 @@ var callItemEventHandlers = function(item, event, evt, ...args){ // NOTE: item events do not directly trigger the original caller's handlers // those will get celled recursively when the events are propagated // up the tree. +// +// XXX need reasonable default item selections... var makeItemEventMethod = function(event, handler, options){ options = Object.assign( // NOTE: we need to be able to pass item objects, so we can not @@ -1799,6 +1801,7 @@ var BaseBrowserPrototype = { // -> state // // XXX should this be an event??? + // XXX calling this on a nested browser should update the whole thing... update: function(options){ return this .make(options) @@ -2016,6 +2019,7 @@ var BaseBrowserPrototype = { // .focus(query[, ...]) // -> this // + // XXX need reasonable default item selections... focus: makeItemEventMethod('focus', function(evt, items){ // blur .focused... this.focused @@ -2043,6 +2047,16 @@ var BaseBrowserPrototype = { // XXX target can be item or path... load: makeEventMethod('load', function(evt, item){}), + // XXX should we be able to update specific items??? + // XXX should a normal event trigger children down the tree??? + // XXX should we have a pre/post events??? + /* + update: makeEventMethod('update', function(evt, options){ + return this + .make(options) + .render(options) }), + //*/ + close: makeEventMethod('close', function(evt, reason){}),