mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40:08 +00:00
some cleanup and doc updates...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b0651a3f7a
commit
893436d9d4
10
ui/marks.js
10
ui/marks.js
@ -66,8 +66,11 @@ var getMarkedGIDBefore = makeGIDBeforeGetterFromList(
|
|||||||
// - toggle img_class on the target image
|
// - toggle img_class on the target image
|
||||||
// - add/remove a mark element after the image
|
// - add/remove a mark element after the image
|
||||||
// - toggle mark_class on the mark element
|
// - toggle mark_class on the mark element
|
||||||
|
// - call the callback, if defined, passing it:
|
||||||
|
// - gid
|
||||||
|
// - action ('on' on 'off')
|
||||||
// - trigger the evt_name on the viewer passing it:
|
// - trigger the evt_name on the viewer passing it:
|
||||||
// - target image
|
// - gid
|
||||||
// - action ('on' on 'off')
|
// - action ('on' on 'off')
|
||||||
//
|
//
|
||||||
// The actual toggler is built with createCSSClassToggler(..), see its
|
// The actual toggler is built with createCSSClassToggler(..), see its
|
||||||
@ -83,6 +86,8 @@ var getMarkedGIDBefore = makeGIDBeforeGetterFromList(
|
|||||||
// - 'off' : force remove mark
|
// - 'off' : force remove mark
|
||||||
// - 'next' : toggle next state (default)
|
// - 'next' : toggle next state (default)
|
||||||
// NOTE: when passing this a gid, the 'next' action is not supported
|
// NOTE: when passing this a gid, the 'next' action is not supported
|
||||||
|
//
|
||||||
|
// XXX do we need a pre-callback here???
|
||||||
function makeMarkToggler(img_class, mark_class, evt_name, callback){
|
function makeMarkToggler(img_class, mark_class, evt_name, callback){
|
||||||
return createCSSClassToggler(
|
return createCSSClassToggler(
|
||||||
'.current.image',
|
'.current.image',
|
||||||
@ -110,7 +115,9 @@ function makeMarkToggler(img_class, mark_class, evt_name, callback){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(callback != null){
|
||||||
callback(gid, action)
|
callback(gid, action)
|
||||||
|
}
|
||||||
|
|
||||||
$('.viewer').trigger(evt_name, [gid, action])
|
$('.viewer').trigger(evt_name, [gid, action])
|
||||||
})
|
})
|
||||||
@ -138,6 +145,7 @@ function makeMarkUpdater(img_class, mark_class, test){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Basic marks...
|
* Basic marks...
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user