zcreativelabs / react-simple-maps

Beautiful React SVG maps with d3-geo and topojson using a declarative api.
https://www.react-simple-maps.io/
MIT License
3.12k stars 426 forks source link

ADD filter func on zoom event #205

Closed sarovin closed 4 years ago

sarovin commented 4 years ago

Hi, I need the filter func on zoom event for filter some gesture. For example:

const filter = useCallback((d3Event) => {
    return d3Event.ctrlKey
  }, []);

...
<ZoomableGroup zoom={1} filterZoomEvent={filter}  >
...

SEE d3-zoom doc => https://github.com/d3/d3-zoom#zoom_filter

sarovin commented 4 years ago

@zimrick please, this is an important feature for us.

zimrick commented 4 years ago

Added in v2.1.0