Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

automaticaly resizing of images bigger than viewable window


Project:jQuery Lightbox Plugin (balupton edition)
Version:1.1.1-final
Component:Code
Category:feature request
Priority:normal
Assigned:balupton
Status:closed
Description

I came up with this problem in my forum where the users have a desktop-gallery. Most of the wallpapers are bigger that the browser's window. As a result, scrollbars appear and I find that a bit annoying because I want to get the whole picture in the viewable zone.

About a week ago I fixed the problem in version 1.0.1 but in the new one (1.1.0) the function that I need to get windowWidth and windowHeight has been removed.

I'm sending you the modified version of 1.1.0 in which I put getPageSize back (at its previous position) and my code that is in showImage, Step2 (lines 767-803)

Thank you for the great work
I hope this may work for you and your further work on the Plugin.

Best regards,
Alexander Marinov

AttachmentSize
jquery.lightbox.js__0.txt32.17 KB

Comments

#1

Version:1.1.0-final» 1.1.1-final

patch against 1.1.1-final
all code needed is isolated in showImage step 2

it works but it's still a bit junky and needs some refinement to match plugin's style.

AttachmentSize
lightbox-1.1.1-final-resize.patch3.71 KB

#2

Status:active» active (needs more info)

Hi Alexander, thanks a lot for this contribution and sorry for my late acknowledgement, this one slipped past me it seems.

I will see about adding this into a 1.3 release, although, I see that using lightbox for such images would be problematic as you can't simply right click the lightbox and go save image as (so downloading gets a bit more difficult). As well as really thumbnails should be used for lightboxes. I think perhaps I should add a download button within the lightbox, do you have any thoughts on this?

Could you provide me a link of where the lightbox is being used like this, so that I can get a better grasp on what the best solution is.

Again thanks a lot for bringing this up and the patch you have supplied.

#3

I added this bit of CSS to my site and it seems to do the trick:

#lightbox-imageBox, #lightbox-infoBox { max-width: 99%; }
#lightbox-imageBox img { max-width: 100%; }
#lightbox-imageBox, #lightbox-nav-btnPrev, #lightbox-nav-btnNext { height: 100% !important; }

#4

Assigned to:ssaki» balupton
Status:active (needs more info)» closed

Adding now, will be in the next release. Solution is javascript based, and will re-apply when the window is resized.