-
Notifications
You must be signed in to change notification settings - Fork 536
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
draggable markers on mobile also drag map with first drag #497
Comments
Hey @Valid Could you confirm this is still happening with |
I can confirm that this is still an issue in version 3.8.0, as I am trying to go around it somehow. |
I'm also experiencing this issue with 3.8.0. |
I found that the source of the problem for me was the safari window bouncing behaviour on iOS. Using iNoBounce fixed this for me. |
We also experience this issue with version 4.8.6. It seems that map.dragPan.disable() / map.dragPan.enable() is not called in case of touchstart/touchend events on layers with draggable features. |
Still an issue but fix is "easy" <MapFeatureRenderer
draggable
onDragEnd={handleDragEnd}
onDragStart={handleDragStart} const handleDragStart = React.useCallback<
NonNullable<MapFeatureRendererProps["onDragStart"]>
>(() => {
if (mapRef.current) {
mapRef.current.dragPan.disable();
}
}, []); const handleDragEnd = React.useCallback<
NonNullable<MapFeatureRendererProps["onDragEnd"]>
>(() => {
if (mapRef.current) {
mapRef.current.dragPan.enable();
}
}, []); |
I thought this was an issue with my own implementation, but I noticed that this happens on the 'switch style' demo as well.
When you first press/drag, it drags the point as well as the map, but every subsequent drag only drags the marker as desired. This happens on my Android Pixel XL as well as my iPhone 7.
The text was updated successfully, but these errors were encountered: