impetus icon indicating copy to clipboard operation
impetus copied to clipboard

setValues does not respect bounds

Open droganov opened this issue 6 years ago • 0 comments

I've added scroll handler in my react component and allows me to beyond the bounds and never come back.

The expected thing is to come back

handleScroll = (event) => {
    const offsetX = this.state.offsetX + event.deltaX;
    const offsetY = this.state.offsetY + event.deltaY;
    this.impetus.setValues(offsetX, offsetY);
    this.setState({ offsetX, offsetY });
    event.preventDefault();
  }

droganov avatar Oct 04 '18 15:10 droganov