Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth zooming while key-down #21

Open
fastaddons opened this issue Sep 7, 2020 · 4 comments
Open

Smooth zooming while key-down #21

fastaddons opened this issue Sep 7, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@fastaddons
Copy link
Collaborator

There is an idea to add smooth zooming capabilities to this extension.
Basically when defined key is down, performing the scrolling action (with scrolling button) will do the smooth zoom in/out instead.

To implement this, I could use transform scale(x) and maybe also with transform-origin set to point where mouse was pressed.
For example:

transform: scale(2);
transform-origin: 50px 50px;

If I apply it to the root HTML element, it should zoom everything correctly.
It seems to be doable, I will look into it before the next release.

@fastaddons fastaddons added the enhancement New feature or request label Sep 7, 2020
@samwolfe2000
Copy link

Actually, there is already a well functioning addon for zooming with scrolling wheel called Scroll Zoom, which works perfectly in conjunction with Scrollanywhere. https://addons.mozilla.org/hu/firefox/addon/scroll-zoom/?src=search

@fastaddons
Copy link
Collaborator Author

Hi, are you the guy that requested this feature? Is this what you meant?

Because there are two types of zooming:

  • phone-like - which will just make everything bigger / smaller, just like magnifying glass, without any layout changes
  • desktop like - that changes font size / elements size / images size. This one changes layout of the page as you zoom.

I would like to implement the phone-like, while the addon you send does only the desktop zoom (which is however trivial to implement). Actually I can do both since the desktop is just one line of code.

@samwolfe2000
Copy link

No, I’m not him, just indicated that there’s a desktop-like zooming addon in case you don’t know about it. The phone one is interesting, although I think this content is quite different than the rest, so it would better suit for a new, seperate addon.

@fastaddons
Copy link
Collaborator Author

fastaddons commented Sep 9, 2020

Well, scrolling and zooming is actually tied together, especially on your phone where it's natural to scroll and zoom and scroll more using the same "fingers" :D. I have a feeling this could be useful on desktop as well if designed well.
I will try to do a proof of concept to see how it goes. If it's too much code and many options, I can make it a separate addon.

But it's similar situation as with the "scrollbar width" feature and now I'm glad it's part of this addon :)

EDIT:
Seems like Firefox added this new zoom to Firefox, I'll have to investigate, maybe I could use it:
https://www.ghacks.net/2020/10/25/firefox-83-gets-vastly-improved-pinch-to-zoom-functionality/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant