mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 03:40: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...
|
// handle click for images...
|
||||||
function handleImageClick(){
|
function handleImageClick(){
|
||||||
|
var ribbons = $(this).parents('.ribbon').siblings('.ribbon')
|
||||||
// set classes...
|
// set classes...
|
||||||
$('.current').removeClass('current')
|
$('.current').removeClass('current')
|
||||||
$(this)
|
$(this)
|
||||||
@ -1359,13 +1360,15 @@ function handleImageClick(){
|
|||||||
centerSquare()
|
centerSquare()
|
||||||
centerIndicator()
|
centerIndicator()
|
||||||
alignRibbons()
|
alignRibbons()
|
||||||
// update this and other ribbons...
|
// update this ribbon...
|
||||||
var w = getViewerWidthImages()
|
var w = getViewerWidthImages()
|
||||||
updateRibbonImages($(this), w)
|
updateRibbonImages($(this), w)
|
||||||
var ribbons = $(this).parents('.ribbon').siblings('.ribbon')
|
// update other ribbons...
|
||||||
var id = $(this).attr('id')
|
var id = $(this).attr('id')
|
||||||
for(var i=0; i<ribbons.length; i++){
|
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