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

Ensure tap-dragging fires an update event #881

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

Zirak
Copy link
Contributor

@Zirak Zirak commented Apr 4, 2019

Tap dragging did not fire a draw.update event, leading to much confusion.

In the interim, a fairly simple fix is to add the following before creating the relevant MapboxDraw instance:

MapboxDraw.modes.simple_select.onTouchEnd = MapboxDraw.modes.simple_select.onMouseUp;

@kkaefer kkaefer added bug events Events that are fired when the user interacts with the map touch-specific labels Jan 7, 2020
@trygveaa
Copy link

I also ran into this issue. Can confirm that the fix is working properly. Can it be merged?

@Zirak
Copy link
Contributor Author

Zirak commented Mar 20, 2020

I also ran into this issue. Can confirm that the fix is working properly. Can it be merged?

Until such a fateful day, you can workaround this bug as outlined in the PR message:

MapboxDraw.modes.simple_select.onTouchEnd = MapboxDraw.modes.simple_select.onMouseUp;

@trygveaa
Copy link

Thanks, yeah I know, but it's always better to have the fix upstream. And it would save time for the next person running into this.

Vejron referenced this pull request in Vejron/mapbox-gl-draw Mar 24, 2020
@karimnaaji karimnaaji closed this Jun 16, 2020
@trygveaa
Copy link

@karimnaaji: Why was this closed? The issue still remains as far as I can see.

@karimnaaji
Copy link
Contributor

Oups sorry about that @trygveaa ! We did a change of repository default branch yesterday and github closed all the PRs that were targetting the old branch as default target, this is the only PR we did not reopen.

@karimnaaji karimnaaji reopened this Jun 17, 2020
@trygveaa
Copy link

Oh, so that's what happened. I did wonder why all my PRs were closed and reopened.

You have to change the destination too though. I see you have done it for most, but not all PRs.

@karimnaaji
Copy link
Contributor

Yep working on it now :)

@karimnaaji karimnaaji changed the base branch from master to main June 17, 2020 17:14
@stepankuzmin stepankuzmin requested a review from a team as a code owner June 28, 2024 15:31
Copy link
Contributor

@stepankuzmin stepankuzmin left a comment

Choose a reason for hiding this comment

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

This was fixed before, but I will merge it to keep the unit test. Thanks for the contribution @Zirak!

@stepankuzmin stepankuzmin merged commit abbb41a into mapbox:main Jun 28, 2024
2 checks passed
@Zirak Zirak deleted the simple-select-tap branch June 29, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug events Events that are fired when the user interacts with the map touch-specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants