mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
fixed a bug...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
85a959e87e
commit
f28b928b26
@ -1349,6 +1349,7 @@ function loadJSON(data, position, set_order){
|
||||
|
||||
// handle click for images...
|
||||
function handleImageClick(){
|
||||
var ribbons = $(this).parents('.ribbon').siblings('.ribbon')
|
||||
// set classes...
|
||||
$('.current').removeClass('current')
|
||||
$(this)
|
||||
@ -1359,13 +1360,15 @@ function handleImageClick(){
|
||||
centerSquare()
|
||||
centerIndicator()
|
||||
alignRibbons()
|
||||
// update this and other ribbons...
|
||||
// update this ribbon...
|
||||
var w = getViewerWidthImages()
|
||||
updateRibbonImages($(this), w)
|
||||
var ribbons = $(this).parents('.ribbon').siblings('.ribbon')
|
||||
// update other ribbons...
|
||||
var id = $(this).attr('id')
|
||||
for(var i=0; i<ribbons.length; i++){
|
||||
updateRibbonImages(getImageBefore(id, $(ribbons[i])), w)
|
||||
var img = getImageBefore(id, $(ribbons[i]))
|
||||
// XXX revise: should we check if ribbon is empty if img is null??
|
||||
updateRibbonImages(img?img:$(ribbons[i]).children('.image').first(), w)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user