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 ondragstart for marker dragging #7799

Merged
merged 1 commit into from
Feb 19, 2019
Merged

add ondragstart for marker dragging #7799

merged 1 commit into from
Feb 19, 2019

Conversation

cs09g
Copy link
Contributor

@cs09g cs09g commented Jan 23, 2019

fix for #7795

Launch Checklist

  • briefly describe the changes in this PR
  • manually test the debug page

@cs09g
Copy link
Contributor Author

cs09g commented Jan 23, 2019

Oops, Flow type HTMLElement doesn't have ondragstart(declaration).
I'll change this to use addEventListener('dragstart', () => false); but it doesn't work as expected with the chages for now.
Changed to use preventDefault()

fix for #7795

the first try was using `ondragstart` to prevent all its dragstart but flow type doens't allow it.
So, it should be using `addEventListener('dragstart')` and in this case, we can prevent dragstart with `preventDefault()`.
@cs09g
Copy link
Contributor Author

cs09g commented Feb 19, 2019

It's ready for review. Could anyone review this please? 😊

Copy link
Contributor

@ryanhamley ryanhamley left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

@ryanhamley ryanhamley merged commit 1d7fefd into mapbox:master Feb 19, 2019
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