mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 03:40:09 +00:00
added basic marking operations (toggle ribbon and toggle block)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a895ed85fe
commit
06219a44cf
@ -138,7 +138,35 @@ Split the API into the following sections:
|
||||
|
||||
var toggleImageMark = createCSSClassToggler('.current.image', 'marked')
|
||||
|
||||
function invertImageMarks(){
|
||||
return $('.current.image')
|
||||
.closest('.ribbon')
|
||||
.find('.image')
|
||||
.toggleClass('marked')
|
||||
}
|
||||
|
||||
// this will toggle marks in the current continuous section of marked
|
||||
// or unmarked images...
|
||||
function toggleImageMarkBlock(image){
|
||||
if(image == null){
|
||||
image = $('.current.image')
|
||||
}
|
||||
// we need to invert this...
|
||||
var state = toggleImageMark()
|
||||
var _convert = function(){
|
||||
if(toggleImageMark(this, '?') == state){
|
||||
return false
|
||||
}
|
||||
toggleImageMark(this, state)
|
||||
}
|
||||
image.nextAll('.image').each(_convert)
|
||||
image.prevAll('.image').each(_convert)
|
||||
return state
|
||||
}
|
||||
|
||||
|
||||
|
||||
// XXX should we use the createCSSClassToggler for this?
|
||||
// XXX revise: does extra stuff...
|
||||
function toggleImageProportions(mode){
|
||||
var image = $('.image')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user