You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a suggestion: Please consider the value "outside" for the property "options.captionPosition" when calculating the value "top". Since at the time of calculation it will be unknown how high the "sl-caption.pos-outside" will be, an option would be desirable to adjust the distance of the image to the upper edge ("top").
In simple-lightbox.js (v 1.13.0), line 234, this does the job for me top': ( $( window ).height() - imageHeight ) / 2 + 70 + 'px',
where 70 is half the height of "sl-caption.pos-outside".
Maybe you have a better idea to solve the problem.
Have a nice day.
Stefan
The text was updated successfully, but these errors were encountered:
I enjoy your great work as well and would like to support this request.
Sometimes I add short description to images and most of the text is cut off in landscape format.
I'm not good at programming and can't modify the code to achieve that.
I was just about to open a new issue, & found this related.
I'm having trouble when large images (already constrained to heightRatio: .85) don't leave enough space at the bottom of the screen for long captions to fit on the page.
I know that a challenge here is that the size of the caption element would need to be rendered to be measured. But it also looks like the image position is calculated (here) before the caption is built.
A simple resolution might be a setting that allows the top edge of the image to be positioned at the top of the page, instead of calculated to appear centered vertically. But that still wouldn't help for excessively long captions.
I "solved" the problem by reducing the image height by the height of the caption.
This looks a bit ugly (the width of the caption still corresponds to the width of the original image), but it works.
Thank you very much for the great work!
I have a suggestion: Please consider the value "outside" for the property "options.captionPosition" when calculating the value "top". Since at the time of calculation it will be unknown how high the "sl-caption.pos-outside" will be, an option would be desirable to adjust the distance of the image to the upper edge ("top").
In simple-lightbox.js (v 1.13.0), line 234, this does the job for me
top': ( $( window ).height() - imageHeight ) / 2 + 70 + 'px',
where 70 is half the height of "sl-caption.pos-outside".
Maybe you have a better idea to solve the problem.
Have a nice day.
Stefan
The text was updated successfully, but these errors were encountered: