mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
some tweaking and minor fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1deb1e939f
commit
f61297a84f
@ -556,7 +556,7 @@ var BaseBrowserPrototype = {
|
||||
// //
|
||||
// // modes:
|
||||
// // false | null - normal order (default)
|
||||
// // true - reverse order of levels but keep
|
||||
// // true | 'tree' - reverse order of levels but keep
|
||||
// // topology order, i.e. containers
|
||||
// // will precede contained elements.
|
||||
// // 'flat' - full flat reverse
|
||||
@ -564,7 +564,7 @@ var BaseBrowserPrototype = {
|
||||
// // NOTE: in 'flat' mode the client loses control over the
|
||||
// // order of processing via doNested(..) as it will be
|
||||
// // called before handleItem(..)
|
||||
// reverseIteration: <bool> | 'flat',
|
||||
// reverseIteration: <bool> | 'flat' | 'tree',
|
||||
//
|
||||
// // If true include inlined parent id in path...
|
||||
// // XXX not implemented yet -- can we implement this???...
|
||||
@ -796,7 +796,28 @@ var BaseBrowserPrototype = {
|
||||
//
|
||||
//
|
||||
//
|
||||
// For supported options see docs for .walk(..)
|
||||
// options format:
|
||||
// {
|
||||
// // Reverse iteration order...
|
||||
// //
|
||||
// // modes:
|
||||
// // false | null - normal order (default)
|
||||
// // true | 'flat' - full flat reverse
|
||||
// // 'tree' - reverse order of levels but keep
|
||||
// // topology order, i.e. containers
|
||||
// // will precede contained elements.
|
||||
// //
|
||||
// // NOTE: in 'flat' mode the client loses control over the
|
||||
// // order of processing via doNested(..) as it will be
|
||||
// // called before handleItem(..)
|
||||
// // NOTE: the semantics of this are slightly different to how
|
||||
// // this option is handled by .walk(..)
|
||||
// reverseIteration: <bool> | 'flat' | 'tree',
|
||||
//
|
||||
// // For other supported options see docs for .walk(..)
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
//
|
||||
// By default this will not iterate items that are:
|
||||
// - non-iterable (item.noniterable is true)
|
||||
@ -807,6 +828,7 @@ var BaseBrowserPrototype = {
|
||||
// - support for options
|
||||
//
|
||||
//
|
||||
//
|
||||
// XXX make item access by index lazy...
|
||||
// - index nested stuff and lengths... (.sublist_length)
|
||||
// - stop when target reached... (control callback???)
|
||||
@ -835,6 +857,13 @@ var BaseBrowserPrototype = {
|
||||
: []
|
||||
var options = args.pop() || {}
|
||||
|
||||
// normalize .reverseIteration default...
|
||||
options = options.reverseIteration === true ?
|
||||
Object.assign({},
|
||||
options,
|
||||
{ reverseIteration: 'flat' })
|
||||
: options
|
||||
|
||||
return this.walk(
|
||||
function(i, path, elem, doNested){
|
||||
return elem != null ?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user