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