Ich habe bei mir lokal mal 5 Zeilen (2 für Bilder, 3 für Video) angepasst. Bisher passt das. Ich bin aber kein JS-ler, von daher nur als Anregung.
Und auch nur die js nicht in der min.js, zum testen die .js eingebunden.
Code:
diff --git a/public/js/glightbox.js b/public/js/glightbox.js
index 678f7cb..e187c6e 100644
--- a/public/js/glightbox.js
+++ b/public/js/glightbox.js
@@ -2874,8 +2874,8 @@
var _slideTriggerNode$get;
maxHeightValue = (_slideTriggerNode$get = slideTriggerNode.getAttribute('data-height')) !== null && _slideTriggerNode$get !== void 0 ? _slideTriggerNode$get : maxHeightValue;
}
- _imgNode.setAttribute('style', "max-height: calc(".concat(maxHeightValue, " - ").concat(descHeight, "px)"));
- description.setAttribute('style', "max-width: ".concat(_imgNode.offsetWidth, "px;"));
+ _imgNode.style = "max-height: calc(".concat(maxHeightValue, " - ").concat(descHeight, "px)");
+ description.style = "max-width: ".concat(_imgNode.offsetWidth, "px;");
}
}
if (video) {
@@ -2915,14 +2915,14 @@
width: vwidth * _ratio,
height: vheight * _ratio
};
- video.parentNode.setAttribute('style', "max-width: ".concat(vsize.width, "px"));
+ video.parentNode.style = "max-width: ".concat(vsize.width, "px");
if (descriptionResize) {
- description.setAttribute('style', "max-width: ".concat(vsize.width, "px;"));
+ description.style = "max-width: ".concat(vsize.width, "px;");
}
} else {
video.parentNode.style.maxWidth = "".concat(videoWidth);
if (descriptionResize) {
- description.setAttribute('style', "max-width: ".concat(videoWidth, ";"));
+ description.style = "max-width: ".concat(videoWidth, ";");
}
}
}