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

Option to disable panning/zooming #40

Closed
wdporter opened this issue Aug 13, 2022 · 6 comments · Fixed by #47
Closed

Option to disable panning/zooming #40

wdporter opened this issue Aug 13, 2022 · 6 comments · Fixed by #47

Comments

@wdporter
Copy link

I was using this perfectly well with the browser zoom mode, and now with your browse/zoom update, that doesn't work very well. Can we please have an option to disable pan/zoom ?

@wdporter wdporter changed the title Option to disale panning/zooming Option to disable panning/zooming Aug 13, 2022
@gereleth
Copy link
Owner

Could you elaborate and tell me what you find more comfortable about browser zoom?

Personally I found it frustrating to drag scrollbars around to see another part of a big puzzle on desktop. And on mobile showing big puzzles in full leads to lagging and performance problems.

@neonz80
Copy link

neonz80 commented Aug 13, 2022

The problem is that the panning is not implemented like the regular page panning/scrolling. I'm using Chrome on MacOS and I'm panning using two fingers on the trackpad and these are some of the problems I've found:

  • The pan direction set in the OS is not checked, so for me the panning is the opposite way than the rest of the system
  • The panning seems to be much faster than regular panning/scrolling and is much harder to control
  • The panning only works if the cursor is over a tile.
  • If you pan until a tile is no longer under the mouse cursor, the panning stops and the browser takes over the panning, scrolling the page down or even goes back to the previous page.

@gereleth
Copy link
Owner

I see, thanks for expaining. That doesn't sound fun).

Regarding the panning speed/direction issues: I'm relying on normalize-wheel package to translate trackpad gestures into pan amount in pixels. This seems to work ok on a few different device/browser configurations I have around but none of them are Macs so I can't really test what happens there. So other than researching alternative event normalization libraries I don't have ideas for how to fix this for you.

Panning only happens when the cursor is over a tile because I didn't want to completely hijack scrolling of the page. I've started thinking of redesigning layout over in #44 to let puzzle take most of the page area so that other scrolling is unnecessary. But I can't say that's going to be done any time soon)).

I could add keyboard controls - something like WASD for panning, some other pair of keys to zoom in/out. As an alternative to trackpad gestures =).

Or maybe I will create this setting option after all. Not thrilled about doing this, lol, because I much prefer new way over old one. But I understand things may be different for others.

@gereleth
Copy link
Owner

Hi @neonz80 @wdporter

I added a setting to disable zoom/pan functions. If you use this setting then things should be more or less back to where they were before. Could you try it at the preview link and verify that it works for you?

@neonz80
Copy link

neonz80 commented Aug 14, 2022

@gereleth
This works fine! Thanks!

@wdporter
Copy link
Author

@gereleth yes that works as I expect, thank you very much.

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

Successfully merging a pull request may close this issue.

3 participants