Skip to content

setValues does not respect bounds #42

@droganov

Description

@droganov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions