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 property to NavigationControl events #8693

Merged

Conversation

stepankuzmin
Copy link
Contributor

This PR adds originalEvent property to events initiated using NavigationControl (zoom in, zoom out, reset bearing). Relates to #6405

Copy link
Contributor

@asheemmamoowala asheemmamoowala left a comment

Choose a reason for hiding this comment

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

@stepankuzmin Thanks for this fix. Looks good , but could you also add a note in the docs to signal that the MouseEvent can be a click when the zoom is triggered by a UI event.

/**
* @typedef {Object} MapBoxZoomEvent
* @property {MouseEvent} originalEvent
*/

stepankuzmin pushed a commit to stepankuzmin/mapbox-gl-js that referenced this pull request Sep 9, 2019
@stepankuzmin
Copy link
Contributor Author

@stepankuzmin Thanks for this fix. Looks good , but could you also add a note in the docs to signal that the MouseEvent can be a click when the zoom is triggered by a UI event.

@asheemmamoowala I've added a note for this

@mourner
Copy link
Member

mourner commented Sep 9, 2019

Also, could you please rebase on master? This might fail the build once merged because of stricter linting rules about curly braces.

@stepankuzmin stepankuzmin force-pushed the navigation_control_originalEvent branch from 1a6e9ea to 2772364 Compare September 9, 2019 16:13
@stepankuzmin
Copy link
Contributor Author

@mourner done!

@mourner mourner merged commit 2934e08 into mapbox:master Sep 9, 2019
@stepankuzmin stepankuzmin deleted the navigation_control_originalEvent branch September 9, 2019 17:48
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.

3 participants