woutervh-/react-pan-and-zoom-hoc

On Zoom End Event

amcdnl opened this issue · 2 comments

It would be nice if there was a onZoomEnd event. I've implemented it in the past like:

onZoom() {
     .... stuff...

    clearTimeout(this.timeout);
    this.timeout = setTimeout(() => {
      this.onZoomEnd();
    }, 500);
}

hi @amcdnl

Seems like an easy enough change. I will make the timeout configurable via props. Will update the issue when I make some progress.

Hi @amcdnl

I've added the request functionality in version 2.1.0.
I've added props zoomEndTimeout and onZoomEnd. You can check the readme for more info.

Let me know if it works alright for you.