haxiomic / firefox-multi-touch-zoom

Smoothly zoom in and out with the multi-touch pinch gesture
MIT License
153 stars 15 forks source link

Zoom only the content, not the toolbar, for the built-in PDF viewer #4

Closed struq closed 5 years ago

struq commented 6 years ago

Hi haxiomic, When viewing a PDF in Firefox, multi-touch zoom provided by this addon is affecting the whole page including the toolbar and sidebar. It might be better if only the PDF content is zoomed, similar to the behavior when using Cmd+ or Cmd- keyboard shortcuts.

haxiomic commented 6 years ago

Thanks for the suggestion @struq, I agree. I've just tried some experiments and it is possible to use the PDF viewer's zoom % to manage scaling. There's some tricky bits involved so it'll take some time but I'm keen have it as a feature.

Surprisingly, Chrome's pinch-to-zoom has this issue and scales up the PDF viewer UI

BenQuinlan commented 5 years ago

Just wondering if anyone might want to re-visit this issue at some point?

haxiomic commented 5 years ago

Hey @BenQuinlan, I've just tested this again in FF 67 and now when I pinch zoom the PDF viewer changes the zoom % rather than scaling the UI (this is something that's changed in the PDF viewer rather than this extension). What does it do for you?

BenQuinlan commented 5 years ago

@haxiomic I've just realized when I pinch zoom with the mouse-pad it works correctly, but I typically use a touchscreen (surfacebook) and that pinch zoom changes the zoom in the entire browser versus the PDF viewer. Not sure if there's a way to change it or not, but thought I'd bring it up.

haxiomic commented 5 years ago

@BenQuinlan Interesting! When you use the touchscreen are the changes smooth or incremental?

BenQuinlan commented 5 years ago

@haxiomic The changes are incremental when using the touchscreen on the PDF viewer. On any other non-PDF page, it is smooth as intended.

haxiomic commented 5 years ago

Ahh ok, I see what's going on – after testing it looks like Firefox no longer allow extensions on the PDF viewer, so the zoom you're seeing must be the native behaviour. You can check the value of browser.gesture.pinch.out (and similar) in about:config to see if it's set to anything other than default

Incidentally, I'll close this issue because we can no longer affect the PDF viewer

I expect it will become smooth zooming when pinch-zoom arrives in Firefox natively (things are moving slowly but still moving :))