mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
another bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
952cfe7031
commit
129c3fea8f
@ -148,6 +148,7 @@ Items.group = function(...items){
|
|||||||
// Place list in a sub-list of item...
|
// Place list in a sub-list of item...
|
||||||
//
|
//
|
||||||
// XXX options???
|
// XXX options???
|
||||||
|
// ...this may leak options.children to the outside...
|
||||||
Items.nest = function(item, list, options){
|
Items.nest = function(item, list, options){
|
||||||
options = options || {}
|
options = options || {}
|
||||||
//options = Object.assign(Object.create(this.options || {}), options || {})
|
//options = Object.assign(Object.create(this.options || {}), options || {})
|
||||||
@ -340,7 +341,11 @@ var makeItemEventMethod = function(event, handler, default_item, filter, options
|
|||||||
filter = args[0] instanceof Function
|
filter = args[0] instanceof Function
|
||||||
&& args.shift()
|
&& args.shift()
|
||||||
var filterItems = function(items){
|
var filterItems = function(items){
|
||||||
items = items instanceof Array ? items : [items]
|
items = items instanceof Array ?
|
||||||
|
items
|
||||||
|
: items === undefined ?
|
||||||
|
[]
|
||||||
|
: [items]
|
||||||
return filter ?
|
return filter ?
|
||||||
items.filter(filter)
|
items.filter(filter)
|
||||||
: items }
|
: items }
|
||||||
@ -1447,7 +1452,9 @@ var BaseBrowserPrototype = {
|
|||||||
// normalize negative index...
|
// normalize negative index...
|
||||||
if(typeof(pattern) == typeof(123) && pattern < 0){
|
if(typeof(pattern) == typeof(123) && pattern < 0){
|
||||||
pattern = -pattern - 1
|
pattern = -pattern - 1
|
||||||
options.reverse = 'flat'
|
options = Object.assign({},
|
||||||
|
options,
|
||||||
|
{reverse: 'flat'})
|
||||||
}
|
}
|
||||||
// normalize/build the test predicate...
|
// normalize/build the test predicate...
|
||||||
var test = (
|
var test = (
|
||||||
@ -1524,6 +1531,7 @@ var BaseBrowserPrototype = {
|
|||||||
// first result only.
|
// first result only.
|
||||||
//
|
//
|
||||||
// XXX should we be able to get offset values relative to any match?
|
// XXX should we be able to get offset values relative to any match?
|
||||||
|
// XXX should next/prev wrap around??? ...option???
|
||||||
get: function(pattern, options){
|
get: function(pattern, options){
|
||||||
var args = [...arguments]
|
var args = [...arguments]
|
||||||
pattern = args.shift()
|
pattern = args.shift()
|
||||||
@ -2175,6 +2183,11 @@ var BaseBrowserPrototype = {
|
|||||||
// .focus(query[, ...])
|
// .focus(query[, ...])
|
||||||
// -> this
|
// -> this
|
||||||
//
|
//
|
||||||
|
// XXX BUG: .focus(-1) turns indexing around persistently -- after it
|
||||||
|
// .focus(0) will get the last element (a-la .focus(-1)) and
|
||||||
|
// .focus(1) will get the second to last element (a-la .focus(-2))
|
||||||
|
// ...are we leaking the multiplier somewhere???
|
||||||
|
// this seems to be isolated to .focus(..)...
|
||||||
focus: makeItemEventMethod('focus',
|
focus: makeItemEventMethod('focus',
|
||||||
function(evt, items){
|
function(evt, items){
|
||||||
// blur .focused...
|
// blur .focused...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user