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

setValues does not respect bounds #42

Open
droganov opened this issue Oct 4, 2018 · 0 comments
Open

setValues does not respect bounds #42

droganov opened this issue Oct 4, 2018 · 0 comments

Comments

@droganov
Copy link

droganov commented Oct 4, 2018

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();
  }
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

1 participant