<Glazblog/>

Image resizing in Firefox

Thanks to Jan Varga long ago, when you open and display a laaaaaarge image in Firefox (File > Open and pick up a large JPG for instance), it's resized and shrunk to fit, and you can click on it to go back to 1:1 scale.  But I was missing a very simple way to move the viewport over that 1:1 scale image without having to touch the two scrollbars. Basically, it was killing me to have that feature in my iPhone and have to deal with scrollbars in Firefox. So here's a trivial and a bit ugly patch to handle that behavior. Because I did not want to break drag-and-drop of an image, you have to press the mouse button AND the shift key when you want to move the viewport over the image. I have no idea if it's worth filing a RFE bug or even if it's a desireable feature for FF. I wanted it myself, period. (comments allowed on this post)

Click here to see the patch.

Comments

1. On Wednesday 6 February 2008, 15:35 by Robert Accettura

I haven't tried the patch, but I like the idea. I'd say file as enhancement. I'm pretty sure others would consider it worthwhile as well.

2. On Wednesday 6 February 2008, 16:05 by Frank

I like the idea. File the RFE.

3. On Wednesday 6 February 2008, 16:21 by Bo

I have a wheel-mouse and can click it to activate auto-scroll, and can pan without having to click on scroll bars.

However, this would make a nice extension for laptop users.

4. On Wednesday 6 February 2008, 16:25 by Daniel Glazman

@Bo : that works only on Windows...

5. On Wednesday 6 February 2008, 17:25 by CAFxX

I wrote an extension that enables the user to drag (left button) and zoom (mouse wheel) the image.
It respects the auto resize preference (even if it does not rely on the normal implementation), and (ATM) allows to zoom back to 1:1 (if the image is smaller than the window or auto resizing is disabled) or to a full view of the image (otherwise) via right click (TBC).
I linked the extension in a RFE I opened a while ago: https://bugzilla.mozilla.org/show_b... (the original scope of my RFE was quite different, but count on my vote as well if you plan to push your RFE)

6. On Thursday 7 February 2008, 00:05 by Jens.B

@Daniel: Autoscroll (over HTML and images) works for me on Mac, as well. Why isn't it implemented on Linux, then? After all, it's both *nix.

7. On Thursday 7 February 2008, 04:35 by justdave

I just use the scrollwheel on the mouse, as well. On my laptop, I have a MacBook Pro, and it does the two-finger thing on the trackpad to emulate a scrollwheel.

This does sound like something handy for people without either of the above-two options though.

8. On Thursday 7 February 2008, 04:53 by Bob

Daniel,

Forgive me for taking this opportunity to be off-topic... but please let us know what happened to your "new partner to give a descendance to Nvu"!

Is it still in the works?... Did the deal fall through?

Please give us at least a bit of an update as to what is happening.

Thanks

9. On Thursday 7 February 2008, 13:15 by Marcelo

Instead of shift, make it the space bar, so it will be the same shortcut as in the adobe apps ( photoshop, illustrator ) and change the mouse cursor to a hand ( haven't tried your patch, ignore this if it does already).

10. On Thursday 7 February 2008, 15:36 by Baka_toroi

Yeah! This is awesome, a long awaited feature. Should be on the official builds.

11. On Thursday 7 February 2008, 16:19 by Mook

I believe autoscroll works on Linux if middlemouse.contentLoadURL is false and general.autoScroll is true.

12. On Thursday 7 February 2008, 20:41 by xeen

May I recommend the "Scrollbar Anywhere" extension? (http://pagesperso-orange.fr/marc.bo...)

Although it sometimes doesn't work (i.e. on tables with collapsed borders), it always works for images. You can choose between middle, left and right mouse button. You can chose between normal mode (the longer the page, the faster the scroll) or acrobat reader mode (mouse move distance = scroll distance).
This has basically replaced my use for the scroll wheel or the auto scroll, as it's smoother compared to the wheel and more precise compared to auto scroll.

It's quite an overkill though for solely "dragging" images, but I agree that the "drag around" key should be space, as in most professional apps.
Greetings
xeen