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

Use transitions when using scroll wheel #179

Closed
kkaefer opened this issue Nov 6, 2013 · 3 comments
Closed

Use transitions when using scroll wheel #179

kkaefer opened this issue Nov 6, 2013 · 3 comments
Assignees

Comments

@kkaefer
Copy link
Member

kkaefer commented Nov 6, 2013

We should smoothly animate the zooming action when using a mouse scroll wheel. When a new transition occurs while one is still in progress, we have to merge both transitions into one new transitions rather than queueing them.

@ghost ghost assigned ansis Dec 2, 2013
@ansis
Copy link
Contributor

ansis commented Dec 3, 2013

added in f9b61f0

It works well for me, but it might be odd on different hardware. If its weird, re-open

When interrupting an in-progress transition, it calculates a new bezier that is continuous with the current position in the old one.

@ansis ansis closed this as completed Dec 3, 2013
@kkaefer
Copy link
Member Author

kkaefer commented Dec 3, 2013

Looks very good, mouse scroll wheel zooming is definitely a lot smoother. I was thinking about implementing different zoom behavior when the user uses a trackpad: Since the user is touching directly, we should tie the zoom to the finger movement directly, i.e. not apply transitions in case of trackpad zooming. However, I'm not sure whether it's possible to distinguish trackpads from mousewheels in all browsers. Typically, the deltas for trackpad zoom are much lower, but they can get in the same area as mousewheel scroll deltas when the user zooms fast. Maybe we can do a heuristic detection that puts zooming into trackpad mode when the first couple of mousewheel events have a low (< 40 or so) delta, and in scrollwheel mode when it has high values.

@ansis
Copy link
Contributor

ansis commented Dec 3, 2013

Yeah, opened #206

bensleveritt pushed a commit to bensleveritt/mapbox-gl-js that referenced this issue Oct 24, 2016
lucaswoj pushed a commit that referenced this issue Jan 11, 2017
Remove array colors as defaults
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

No branches or pull requests

2 participants