mapbox / supercluster

A very fast geospatial point clustering library for browsers and Node.
ISC License
2.12k stars 300 forks source link

Make components in portal able to capture events #163

Closed Honason closed 4 years ago

Honason commented 4 years ago

By default, the content of all Markers, Popups etc inside Map capture mouse events, making it hard to drag/zoom the map. That behaviour can be reversed with renderChildrenInPortal prop. However, that removes the ability to have some components capture mouse events.

I think that very popular use case is to want to have Markers pass through mouse events, but Popups capture them. That is not possible now as far as I know.

My suggestion is to add a new prop to components inside the Map, maybe captureEvents, captureMouseEvents... to control this behaviour, when renderChildrenInPortal is set.

mourner commented 4 years ago

Looks like you reported the issue in the wrong repo, and I don't know which is the right one judging by the description, so have to close this.

Honason commented 4 years ago

Ah yes, sorry for that!