Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
According to the help text, lightbox height and width can be set via the rel parameter. For video, height and width are ignored. I made the following change to lightbox.js to take height and width styles into account.
Index: js/lightbox.js
===================================================================
--- js/lightbox.js (revision 16228)
+++ js/lightbox.js (working copy)
@@ -337,7 +337,7 @@
var anchor_title = (rel_data["title"] ? rel_data["title"] : anchor.title);
if (rel_data["rel"] == rel) {
if (rel_data["group"] == rel_group) {
- if (Lightbox.isLightframe || Lightbox.isModal) {
+ if (Lightbox.isLightframe || Lightbox.isModal || Lightbox.isVideo) {
rel_style = rel_data["style"];
}
Lightbox.imageArray.push([anchor.href, anchor_title, alt, rel_style]);
Comments
Comment #1
stella CreditAttribution: stella commentedcommitted, thanks!