mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-22 11:11:39 +00:00
some fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ecb1458f93
commit
3eb788b02e
@ -335,6 +335,11 @@ module.ImagesPrototype = {
|
||||
forEach: function(func){
|
||||
var i = 0
|
||||
for(var key in this){
|
||||
// reject non images...
|
||||
// XXX make this cleaner...
|
||||
if(key == 'length' || typeof(this[key]) == typeof(function(){})){
|
||||
continue
|
||||
}
|
||||
func.call(this[key], key, this[key], i++, this)
|
||||
}
|
||||
return this
|
||||
@ -343,6 +348,11 @@ module.ImagesPrototype = {
|
||||
var res = this.constructor()
|
||||
var i = 0
|
||||
for(var key in this){
|
||||
// reject non images...
|
||||
// XXX make this cleaner...
|
||||
if(key == 'length' || typeof(this[key]) == typeof(function(){})){
|
||||
continue
|
||||
}
|
||||
res[k] = func.call(this[key], key, this[key], i++, this)
|
||||
}
|
||||
return res
|
||||
@ -351,6 +361,11 @@ module.ImagesPrototype = {
|
||||
var res = this.constructor()
|
||||
var i = 0
|
||||
for(var key in this){
|
||||
// reject non images...
|
||||
// XXX make this cleaner...
|
||||
if(key == 'length' || typeof(this[key]) == typeof(function(){})){
|
||||
continue
|
||||
}
|
||||
if(func.call(this[key], key, this[key], i++, this)){
|
||||
res[key] = this[key]
|
||||
}
|
||||
@ -360,6 +375,11 @@ module.ImagesPrototype = {
|
||||
reduce: function(func, initial){
|
||||
var res = initial
|
||||
for(var key in this){
|
||||
// reject non images...
|
||||
// XXX make this cleaner...
|
||||
if(key == 'length' || typeof(this[key]) == typeof(function(){})){
|
||||
continue
|
||||
}
|
||||
res = func.call(this[key], res, this[key], key, i++, this)
|
||||
}
|
||||
return res
|
||||
|
||||
@ -2343,6 +2343,9 @@ var drawer = require('lib/widget/drawer')
|
||||
// handled
|
||||
// .close()
|
||||
//
|
||||
// XXX need a way to prevent closing ONLY if action is run FROM the
|
||||
// list...
|
||||
// ...the current solution does not have this problem...
|
||||
//
|
||||
var makeActionLister = function(list, filter, pre_order){
|
||||
pre_order = typeof(filter) == typeof(true) ? filter : pre_order
|
||||
@ -2441,7 +2444,8 @@ var makeActionLister = function(list, filter, pre_order){
|
||||
var ActionTreeActions = actions.Actions({
|
||||
// XXX move this to a generic modal overlay feature...
|
||||
getOverlay: ['Interface/Get overlay object',
|
||||
function(){
|
||||
function(o){
|
||||
return overlay.getOverlay(o || this.viewer)
|
||||
}],
|
||||
|
||||
browseActions: ['Interface/Browse actions',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user