mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
24745ffda3
commit
8c7f20a946
@ -855,13 +855,6 @@ var BaseBrowserPrototype = {
|
|||||||
func = args[0] instanceof Function ?
|
func = args[0] instanceof Function ?
|
||||||
args.shift()
|
args.shift()
|
||||||
: undefined
|
: undefined
|
||||||
var i = typeof(args[0]) == typeof(123) ?
|
|
||||||
args.shift()
|
|
||||||
: 0
|
|
||||||
var path = (args[0] instanceof Array
|
|
||||||
|| typeof(args[0]) == typeof('str')) ?
|
|
||||||
args.shift()
|
|
||||||
: []
|
|
||||||
var options = args.pop() || {}
|
var options = args.pop() || {}
|
||||||
options = !options.defaultReverse ?
|
options = !options.defaultReverse ?
|
||||||
Object.assign({},
|
Object.assign({},
|
||||||
@ -883,8 +876,7 @@ var BaseBrowserPrototype = {
|
|||||||
// gave us and not the constructed function that we
|
// gave us and not the constructed function that we
|
||||||
// pass to .walk(..) above...
|
// pass to .walk(..) above...
|
||||||
return sublist.map(func, i, path, options) },
|
return sublist.map(func, i, path, options) },
|
||||||
i,
|
...args,
|
||||||
path,
|
|
||||||
options)
|
options)
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -900,13 +892,6 @@ var BaseBrowserPrototype = {
|
|||||||
func = args[0] instanceof Function ?
|
func = args[0] instanceof Function ?
|
||||||
args.shift()
|
args.shift()
|
||||||
: undefined
|
: undefined
|
||||||
var i = typeof(args[0]) == typeof(123) ?
|
|
||||||
args.shift()
|
|
||||||
: 0
|
|
||||||
var path = (args[0] instanceof Array
|
|
||||||
|| typeof(args[0]) == typeof('str')) ?
|
|
||||||
args.shift()
|
|
||||||
: []
|
|
||||||
var options = args.pop() || {}
|
var options = args.pop() || {}
|
||||||
|
|
||||||
// XXX better name...
|
// XXX better name...
|
||||||
@ -936,11 +921,7 @@ var BaseBrowserPrototype = {
|
|||||||
// gave us and not the constructed function that we
|
// gave us and not the constructed function that we
|
||||||
// pass to .walk(..) above...
|
// pass to .walk(..) above...
|
||||||
return sublist.search(func, i, path, options) || [] },
|
return sublist.search(func, i, path, options) || [] },
|
||||||
// XXX this is essentially the only place we need parsed arguments...
|
...args,
|
||||||
// ...can we either pass in the args in some standard format
|
|
||||||
// or spec the format and let walk handle it???
|
|
||||||
i,
|
|
||||||
path,
|
|
||||||
options)
|
options)
|
||||||
|
|
||||||
// nothing found...
|
// nothing found...
|
||||||
@ -1536,11 +1517,13 @@ var BaseBrowserPrototype = {
|
|||||||
// normal item...
|
// normal item...
|
||||||
: [ renderer.renderItem(item, i, context) ] ) },
|
: [ renderer.renderItem(item, i, context) ] ) },
|
||||||
function(func, i, path, sublist, options){
|
function(func, i, path, sublist, options){
|
||||||
return sublist.render(context, renderer) },
|
return sublist.render(context, renderer, i, path) },
|
||||||
// make the element render less strict...
|
// make the element render less strict...
|
||||||
function(elem){
|
function(elem){
|
||||||
return elem
|
return elem
|
||||||
&& elem.render instanceof Function },
|
&& elem.render instanceof Function },
|
||||||
|
// pass on i and path if given...
|
||||||
|
...[...arguments].slice(2),
|
||||||
options)
|
options)
|
||||||
|
|
||||||
// determine the render mode...
|
// determine the render mode...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user