pull/1/head
Jan Umbach 2024-05-28 17:16:17 +02:00
parent c873f5de66
commit 755d7c7102
1 changed files with 8 additions and 0 deletions

View File

@ -1134,10 +1134,17 @@ class VariantSelects extends HTMLElement {
console.log('mediaGallery.dataset', mediaGallery.dataset);
let index = 0;
for (const galleryImage of galleryImages) {
// if display is not none, then show the image
if (galleryImage.style.display !== 'none') {
if (index < 1) {
index++;
continue;
}
console.log('galleryImage.dataset', galleryImage.dataset);
const target = galleryImage.dataset.target; // "template--22806669590804__main-38794319626516"
@ -1146,6 +1153,7 @@ class VariantSelects extends HTMLElement {
mediaGallery.setActiveMedia(`${this.dataset.section}-${targetIdSplit}`, true);
break;
}
}