cleanup and notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-06-16 21:20:34 +03:00
parent fc8c745ac3
commit 2b483b4019

View File

@ -2678,7 +2678,8 @@ var BaseBrowserPrototype = {
items.forEach(function(item){ items.forEach(function(item){
delete item.focused }) }, delete item.focused }) },
default_item: function(){ return this.focused } }), default_item: function(){ return this.focused } }),
// NOTE: .next() / .prev() will wrap around the first/last elements... // NOTE: .next() / .prev() will wrap around the first/last elements,
// this is different from .focus('next') / .focus('prev')...
next: function(){ next: function(){
this.focus('next').focused || this.focus('first') this.focus('next').focused || this.focus('first')
return this }, return this },
@ -2693,10 +2694,7 @@ var BaseBrowserPrototype = {
// selection... // selection...
select: makeItemOptionOnEventMethod('select', 'selected'), select: makeItemOptionOnEventMethod('select', 'selected'),
deselect: makeItemOptionOffEventMethod('deselect', 'selected'), deselect: makeItemOptionOffEventMethod('deselect', 'selected'),
toggleSelect: makeItemEventToggler( toggleSelect: makeItemEventToggler('selected', 'select', 'deselect', 'focused'),
'selected',
'select', 'deselect',
'focused'),
// topology... // topology...
collapse: makeItemOptionOnEventMethod('collapse', 'collapsed', { collapse: makeItemOptionOnEventMethod('collapse', 'collapsed', {
filter: function(elem){ return elem.value && elem.children }, filter: function(elem){ return elem.value && elem.children },
@ -2723,10 +2721,7 @@ var BaseBrowserPrototype = {
// visibility... // visibility...
hide: makeItemOptionOnEventMethod('hide', 'hidden'), hide: makeItemOptionOnEventMethod('hide', 'hidden'),
show: makeItemOptionOffEventMethod('show', 'hidden'), show: makeItemOptionOffEventMethod('show', 'hidden'),
toggleHidden: makeItemEventToggler( toggleHidden: makeItemEventToggler('hidden', 'hide', 'show', 'focused'),
'hidden',
'hide', 'show',
'focused'),
// primary/secondary/ternary? item actions... // primary/secondary/ternary? item actions...
open: makeItemEventMethod('open', { open: makeItemEventMethod('open', {
@ -2750,7 +2745,7 @@ var BaseBrowserPrototype = {
// -> state // -> state
// //
// //
// NOTE: .update() is the same as .render() // NOTE: .update() without arguments is the same as .render()
// //
// XXX calling this on a nested browser should update the whole thing... // XXX calling this on a nested browser should update the whole thing...
// ...can we restore the context via .parent??? // ...can we restore the context via .parent???