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

add originalEvent on user-initiated scroll zoomend and moveend #1975 #6175

Merged
merged 1 commit into from
Feb 26, 2018

Conversation

stepankuzmin
Copy link
Contributor

originalEvent is missing on zoomend and moveend user-initiated scroll events. This PR adds _lastWheelEvent as originalEvent to zoomend and moveend events.

See #1975 for more info.

Launch Checklist

  • write tests for all new functionality
  • manually test the debug page

@jfirebaugh
Copy link
Contributor

Can you say more about why you need this? I'm thinking that (in conjunction with supporting changes, see #3290 (comment) and #6047 (comment)) we should remove originalEvent from secondary events like zoomend and moveend, reserving it for events like mousedown and mouseup that correspond 1-to-1 with a DOM event.

Hearing more about what people are using originalEvent for will help me evaluate whether I'm on track with these plans.

@stepankuzmin
Copy link
Contributor Author

Thanks for the reply! The main point is to detect if an *end event was initiated by a user. Consider using Mapbox GL JS in a Reactive application as an example. Using the set of *end event handlers, in that case, seems more logical than using single move event handler with debouncing.

Copy link
Contributor

@jfirebaugh jfirebaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will merge for now and consider future approach in #6047.

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 this pull request may close these issues.

2 participants