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

Zooming threshold code #21

Open
jlgrall opened this issue Nov 30, 2014 · 2 comments
Open

Zooming threshold code #21

jlgrall opened this issue Nov 30, 2014 · 2 comments
Labels

Comments

@jlgrall
Copy link

jlgrall commented Nov 30, 2014

In your threshold code, you refuse values that exceed the threshold:

if (matrix.d >= threshold[1]) {
  return;
}

This code can cause problems if:

  • the mousewheel increases the zoom with large steps. For example: start=0, step=30, max=59. You will never get close to 59, you will be limited to 30.
  • if I programmatically directly modify the transform attribute to apply a zoom that goes over the threshold, then I cannot zoom back with the mousewheel, it will be completely blocked.
  • if you rotate the view, then matrix.d will not be your zoom factor anymore, which makes all your computations wrong. See matrix descriptions in: http://www.w3.org/TR/SVG/coords.html#EstablishingANewUserSpace
@hueitan hueitan added the bug label May 11, 2015
@hueitan
Copy link
Owner

hueitan commented May 11, 2015

@jlgrall You are right on this. We need a better try to handle zoom threshold.

@hueitan
Copy link
Owner

hueitan commented Jun 11, 2015

Any good idea for this @jlgrall ?

hueitan pushed a commit that referenced this issue Aug 10, 2016
Issue #21 Fixed zoom threshold behaviour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants