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

Can't drag map after mouseover circle marker #44

Open
imShara opened this issue Aug 7, 2019 · 3 comments
Open

Can't drag map after mouseover circle marker #44

imShara opened this issue Aug 7, 2019 · 3 comments

Comments

@imShara
Copy link

imShara commented Aug 7, 2019

Example: https://jsfiddle.net/ea1xou73/1/

How to reproduce:

  1. Try to drag map
  2. Try to mouseover marker
  3. Try to mouseout marker
  4. Try to drag map again
  5. Oups.
  6. Try to mouseout the map
  7. Try to drag again
  8. It works.

Maybe duplicate #11

@imShara
Copy link
Author

imShara commented Aug 8, 2019

The problem is here:

_handleMouseOut: function (e) {
    if (!draggingMap) {
        this._disableInteractions(); // All works normal if commnt this line
    }
}

Why need this instead simple scrollWheelZoom: false?

@imShara
Copy link
Author

imShara commented Aug 8, 2019

Temporary removed all _handleMouseOver, _handleMouseOut, _disableInteractions, _enableInteractions and all works as expected.

https://jsfiddle.net/9sn1rg3v/

MinerMax555 added a commit to MinerMax555/Leaflet.GestureHandling that referenced this issue Jan 25, 2021
@tz1010
Copy link

tz1010 commented Jan 13, 2022

If someone is still fighting with the issue here is a workaround without modifying the lib itself:

   circleMarker.on('mouseout', () =>
      setTimeout(() => {
        this.map.dragging.enable();
        this.map.scrollWheelZoom.enable();
        if (this.map.tap) {
          this.map.tap.enable();
        }
      }),
    )

youseeus pushed a commit to HBTGmbH/Leaflet.GestureHandling that referenced this issue Oct 27, 2022
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

No branches or pull requests

2 participants