Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/wwwroot/js/genpage/gentab/currentimagehandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,21 @@ function setCurrentImage(src, metadata = '', batchId = '', previewGrow = false,
}
}
}
let historyContainer = document.getElementById('imagehistorybrowser-content');
if (historyContainer) {
let normalizedSrc = getImageFullSrc(src);
for (let i of historyContainer.getElementsByClassName('image-block')) {
// History browser images may have data-src (if clicked) or just data-name (if not clicked yet)
let historyImgSrc = i.dataset.src || i.dataset.name;
let normalizedHistorySrc = historyImgSrc ? getImageFullSrc(historyImgSrc) : null;
if (normalizedHistorySrc && normalizedSrc == normalizedHistorySrc) {
i.classList.add('image-block-current');
}
else {
i.classList.remove('image-block-current');
}
}
}
}

/** Gets the container div element for a generated image to put into, in the batch output view. If Separate Batches is enabled, will use or create a per-batch container. */
Expand Down