tweaking and notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-03-14 17:03:46 +03:00
parent b95aeb0b24
commit 14055acf26

View File

@ -734,6 +734,7 @@ var BaseBrowserPrototype = {
// //
// XXX add path support... // XXX add path support...
// XXX add literal item support (???) // XXX add literal item support (???)
// XXX do not get .subtree elements of a .collapsed item...
get: function(key, _){ get: function(key, _){
key = key == null ? 0 : key key = key == null ? 0 : key
@ -750,8 +751,9 @@ var BaseBrowserPrototype = {
do { do {
// direct match... // direct match...
// XXX this is messed up on the second+ iteration...
if(sublists.length == 0 || key - offset < sublists[0][1]){ if(sublists.length == 0 || key - offset < sublists[0][1]){
return items[key - i] return items[key - offset]
} }
// query the sublist... // query the sublist...
@ -776,7 +778,7 @@ var BaseBrowserPrototype = {
return res return res
} }
offset = offset + (sublist.sublist || sublist.value).length offset += (sublist.sublist || sublist.value).length
// XXX not sure about this... // XXX not sure about this...
} while(items.length > key - (i + offset)) } while(items.length > key - (i + offset))