impetus
impetus copied to clipboard
setValues does not respect bounds
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();
}