When you wanna change atm the border width around the image, you need to edit some css _and_ edit the lightbox.js. The latter option is unneccessary, so please make it possible to change the border width, without the need to edit the js-file.
It would also be nice if the handling how the lightbox is positioned, would be reworked. Atm the js checks only the top margin, but I ran into the problem that, when I use the alternative layout, there's free space above the picture, but it's going "over" the bottom of the screen. So, something in the top-space-equation seems to be wrong.
Comments
Comment #1
Dunedan commentedJust an addition: It seems that the js doesn't respect the height of the part with the text and the arrows in the alternative layout when calculating the top-space of the lightbox.
Comment #2
stella commentedThe border size needs to be in the lightbox.js file so it can correctly calculate the size of the lightbox and how much (if anything) that it needs to down-scale the image by in order to make it fit on one screen.
I can't reproduce the issue you mention with the picture going over the bottom of the screen. I've tested this in both Firefox 2.0.0.12 and IE 7 on windows. Are you using another browser / platform?
The only scenario I can think of where you should encounter this is if you have a very long image description appearing below the image in the lightbox. Lightbox only supports two lines of text before it goes over the bottom of the screen. I don't believe it's possible to avoid this in this scenario.
Cheers,
Stella
Comment #3
Dunedan commentedI don't use any image description and have this issue as well with Firefox 2.0.0.12 as with Konqueror 3.5.8. Both under Linux. I attached one screenshot of every browser showing the issue. The screenshot covers the whole visible area of the window, to see more, you need to scroll.
When I set the top-margin of the lightbox div to 0px, there isn't any space between the border of the picture and the top of the window. So there is no strange place due to my stylesheet.
But there may be problems with a different padding than the orginal padding. I set the padding in the lightbox.js to 8 and in the stylesheet the padding of #imageContainer to 8px.
I hope these infos help to figure out what's wrong there.
Comment #4
stella commentedCan you send me the url of your website so I can take a look? You can do this via my contact form if you wish. Failing that could you send me your lightbox_alt.css and lightbox_alt.js files as you're not using the standard alternative layout - the zoom button is a different place, which depending on how you did it, may affect the image size calculation. Also try out the new 5.x-2.4 release - though I;m not sure it will help with this.
Cheers,
Stella
Comment #5
Dunedan commentedOn the public version of that website I've only smaller pictures, which should be small enough to fit into the window. Locally I tested how it would look with larger pictures and zoom and stumbled over that issue.
The above screenshots have been taken using 5.x-2.4. I only adjusted the borderSize in the .js to 8 and added the following css code to the stylesheet of my theme:
Comment #6
stella commentedThe lightbox does not go off the page in the original code, so changing this to be a support request.
You'll notice that the borderSize in the original lightbox.js file doesn't match the padding in the original lightbox_alt.css file. If you leave the js file unchanged, the lightbox doesn't go off the bottom of the page. A borderSize of 15 is probably as low as you should go when using padding of 8px in the css file. A bit of testing and tweaking should find you the layout that you're looking for.
Cheers,
Stella
Comment #7
Dunedan commentedI know that the original paddings don't match. But when I use a higher borderSize than the padding it looks like the attached screenshot. That screenshot has been taken with borderSize 15 and padding 8. It fits to the bottom of the window, but the right border around the image is bigger than the left. That happens always when I use a greater borderSize than the padding. So I use the same value for borderSize and padding.
Regards
Dunedan
Comment #8
stella commentedAh, that's an issue with that version of jquery. The image isn't actually centered. The css and the lightbox.js file is coded so that it ought to be, but one of the jquery function calls overrides the layout. IIRC, it's the fadeIn() function that causes this. I think it sets the css attribute to "block". I did consider adding some to re-position the image again after the call, but when I did, it caused the image to "jump" in some browsers and I didn't consider that acceptable. I don't think this happens with the jquery version in D6 though.
This is already discussed in another issue - #201865.
Cheers,
Stella
Comment #9
Dunedan commentedOk, but there are some contradictions. Just assume that the image would be correctly centered: How could I make the border left and right of the image smaller without losing the correct positioning of the image between top and bottom?
The padding is atm only used to put the image in the middle of the lightbox region. The only way to shrink this region is to shrink the borderSize, what'll cause the losing of the top-bottom-positioning.
Regards,
Dunedan
Comment #10
stella commentedYou could try using css attributes "padding-top" and "padding-bottom", tweaking those and see can you achieve what you want with those. However, there's no way to split out the borderSize in the javascript without some code changes, which is something I'm not inclined to implement.
Cheers,
Stella
Comment #11
Dunedan commentedI assume you don't understand the issue:
With the currenct code it is impossible to create a lightbox with an image border less than 15px left and right while the image isn't running over the bottom (assuming it's an image that can be zoomed).
Just try it out. You can't shrink the borderSize to less than 15 if you wanna fit the image into the window without floating above the bottom. And if you've a borderSize of 15 you have 15px border left and right of the image. The padding property doesn't affect that.
It's hard to describe that issue, but I'll keep trying.
Regards,
Dunedan
Comment #12
stella commentedAs I said there's no way to separate out the size in the javascript without code changes. Try the attached patch.
Comment #13
Dunedan commentedOk, thx for your help. That patch works like a charm. :-)
Comment #14
stella commentedComment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #16
stella commentedReleased in lightbox 2 5.x-2.5 and lightbox 2 6.x-1.5.
Cheers,
Stella