fix error

This commit is contained in:
邱博亞 2023-03-11 11:46:36 +08:00
parent 8588431962
commit 89c67b223b
1 changed files with 1 additions and 2 deletions

View File

@ -435,8 +435,8 @@ window.GalleryTheater = function() {
window.setMainPic = function(direction, selectedFromStrip) { window.setMainPic = function(direction, selectedFromStrip) {
var img = null; var img = null;
$('div.gallery-show-original a').eq(0).attr('href', currentPic.image.url) $('div.gallery-show-original a').eq(0).attr('href', currentPic.image.url)
img = imageContainer.find(".gal-active");
if (direction == null) { if (direction == null) {
img = $("<img class='gallery-image gal-active'>");
img.hide(); img.hide();
img.attr("src", currentPic.image.file.theater.url); img.attr("src", currentPic.image.file.theater.url);
img.attr("alt", currentPic.image.alt_title); img.attr("alt", currentPic.image.alt_title);
@ -446,7 +446,6 @@ window.GalleryTheater = function() {
}) })
isTheaterInitialized = true; isTheaterInitialized = true;
} else { } else {
img = imageContainer.find(".gal-active");
if (selectedFromStrip) { if (selectedFromStrip) {
img = imageContainer.find(".gal-" + direction); img = imageContainer.find(".gal-" + direction);
img.attr("src", currentPic.image.file.theater.url); img.attr("src", currentPic.image.file.theater.url);