No need to search for old selected thumbnail.
This commit is contained in:
parent
0def797cf9
commit
3da37b28a3
@ -144,7 +144,7 @@ Gallery =
|
|||||||
newID = +thumb.dataset.id
|
newID = +thumb.dataset.id
|
||||||
|
|
||||||
# Highlight, center selected thumbnail
|
# Highlight, center selected thumbnail
|
||||||
$.rmClass el, 'gal-highlight' if el = $ '.gal-highlight', nodes.thumbs
|
$.rmClass el, 'gal-highlight' if el = Gallery.images[oldID]
|
||||||
$.addClass thumb, 'gal-highlight'
|
$.addClass thumb, 'gal-highlight'
|
||||||
nodes.thumbs.scrollTop = thumb.offsetTop + thumb.offsetHeight/2 - nodes.thumbs.clientHeight/2
|
nodes.thumbs.scrollTop = thumb.offsetTop + thumb.offsetHeight/2 - nodes.thumbs.clientHeight/2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user