mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
minor tweaking/refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
146b059938
commit
e8670825cd
@ -444,7 +444,7 @@ var makeItemEventToggler = function(get_state, set_state, unset_state, default_i
|
|||||||
'!': '!',
|
'!': '!',
|
||||||
}
|
}
|
||||||
|
|
||||||
return function(item, state){
|
return (function eventToggler(item, state){
|
||||||
var that = this
|
var that = this
|
||||||
// normalize/parse args...
|
// normalize/parse args...
|
||||||
state = item in states ?
|
state = item in states ?
|
||||||
@ -489,7 +489,11 @@ var makeItemEventToggler = function(get_state, set_state, unset_state, default_i
|
|||||||
.run(function(){
|
.run(function(){
|
||||||
return this.length == 1 ?
|
return this.length == 1 ?
|
||||||
this[0]
|
this[0]
|
||||||
: this }) } }
|
: this }) })
|
||||||
|
// support instanceof Toggler tests...
|
||||||
|
.run(function(){
|
||||||
|
this.__proto__ = toggler.Toggler.prototype
|
||||||
|
this.constructor = toggler.Toggler })}
|
||||||
// XXX this is incomplete...
|
// XXX this is incomplete...
|
||||||
var makeItemEventToggler2 = function(get_state, set_state, unset_state, default_item, multi){
|
var makeItemEventToggler2 = function(get_state, set_state, unset_state, default_item, multi){
|
||||||
var _get_state = get_state instanceof Function ?
|
var _get_state = get_state instanceof Function ?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user