slimbox icon indicating copy to clipboard operation
slimbox copied to clipboard

Image is unreachable when wider than the browser window.

Open GoogleCodeExporter opened this issue 9 years ago • 10 comments

What steps will reproduce the problem?
1. Open example.html.
2. Resize your browser smaller than the image width.
3. Click the link to display the image.

What is the expected output? What do you see instead?
The image appears wider than the browser. I would expect to be able to scroll 
horizontally to see the rest of the image or have the image scale down to fit 
in the viewport, but instead I get an infinite scrollbar horizontally.

What version of the product are you using? On what operating system?
Occurs in slimbox 2.04. Observed on:
Windows: IE6, IE7, IE8
OS X: Chrome, Safari, Firefox3.6

Please provide any additional information below.
I have attached a patch that fixes this issue by scaling the image down, and an 
image that goes with it in the css directory.
This uses an img tag to scale the image, instead of a background-image that 
will not scale.

Original issue reported on code.google.com by adam.stegman on 20 Oct 2010 at 9:20

Attachments:

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

Please fix this issue. It would be nice to have the box max out on users screen 
so it doesnt overfill.

Original comment by [email protected] on 17 Apr 2011 at 2:31

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

+1 for fixing this issue.  It seems to me that the patch from adam assumes the 
image will always be too wide for the screen.  I believe if you have an image 
that is very tall and narrow, his patch will not resize it down as it only 
checks the width.  Shouldn't be too difficult to add a height check as well.  
Thanks for the patch, adam.

Original comment by [email protected] on 2 May 2011 at 5:22

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

I've attached a copy of adams patch, and a patch to be applied on top of it 
that will ensure that both the height and width are within the current browser 
window.  I'm also subtracting 20 pixels to add some padding from the edge of 
the window, but this can be removed.

Original comment by [email protected] on 2 May 2011 at 6:02

Attachments:

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

Any plans to merge this patch into the trunk? I'm having trouble applying the 
patch (windows machine with gnuwin32 patch)

Original comment by [email protected] on 25 May 2011 at 11:47

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

must the patch be applied by hand? Or is there a smarter way to merge the 
changes into the slimbox2.js file?

Original comment by [email protected] on 10 Jun 2011 at 10:56

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

My patch can be applied through git:
> git svn clone http://slimbox.googlecode.com/svn/trunk slimbox
> cd slimbox
> cp 
~/Downloads/0001-Ported-fullscreen-image-fixes-from-bug-2435-to-slimb.patch .
> git apply 0001-Ported-fullscreen-image-fixes-from-bug-2435-to-slimb.patch

Original comment by adam.stegman on 10 Jun 2011 at 11:42

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

Thanks, but whoa. A lot of work for someone new to git. You wouldn't happen to 
have a working copy?

Original comment by [email protected] on 12 Jun 2011 at 6:07

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

Sorry, nothing available online. This was generated from a local repo.

The *NIX patch utility [1] can apply the patch as well:
> patch -p1 < 0001-Ported-fullscreen-image-fixes-from-bug-2435-to-slimb.patch

[1] http://en.wikipedia.org/wiki/Patch_(Unix)

Original comment by adam.stegman on 14 Jun 2011 at 6:06

GoogleCodeExporter avatar Apr 12 '15 15:04 GoogleCodeExporter

Feel free to create a pull request here on Github.

cbeyls avatar Apr 17 '15 23:04 cbeyls

Will this be fixed any time?

Cyberuben avatar Aug 21 '15 13:08 Cyberuben