From 3da37b28a39fbfc8ecda2e41e20c1619c531a820 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 13 Jun 2015 00:22:22 -0700 Subject: [PATCH] No need to search for old selected thumbnail. --- src/Images/Gallery.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 815f6e456..d4ea8c4b7 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -144,7 +144,7 @@ Gallery = newID = +thumb.dataset.id # 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' nodes.thumbs.scrollTop = thumb.offsetTop + thumb.offsetHeight/2 - nodes.thumbs.clientHeight/2