Skip to content

Add originalEvent property to NavigationControl events - #8693

Merged
mourner merged 3 commits into
mapbox:masterfrom
stepankuzmin:navigation_control_originalEvent
Sep 9, 2019
Merged

Add originalEvent property to NavigationControl events#8693
mourner merged 3 commits into
mapbox:masterfrom
stepankuzmin:navigation_control_originalEvent

Conversation

@stepankuzmin

Copy link
Copy Markdown
Contributor

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

@asheemmamoowala asheemmamoowala left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

mourner commented Sep 9, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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