Rather than expose more configuration options to the user, this adds a movement threshold so that autoscroll does not happen until the item has been dragged more than 10 pixels, and ensures it autoscrolls only in the correct direction.
Furthermore, the scroll speed is also adjusted for these cases, so that the speed is not so high when the starting position of the scroll is within the AUTOSCROLL_ACTIVE_OFFSET.
I confirmed that this does not break existing scroll behavior in tall containers / windows, and I added an example for this ("Scrolling container short"), but I'm not sure whether it's worth committing it or not. I included it so that you could easily test out the fixes here, @tajo.
Fixes https://github.com/tajo/react-movable/issues/68 Fixes https://github.com/tajo/react-movable/issues/80 Closes https://github.com/tajo/react-movable/pull/78
Rather than expose more configuration options to the user, this adds a movement threshold so that autoscroll does not happen until the item has been dragged more than 10 pixels, and ensures it autoscrolls only in the correct direction.
Furthermore, the scroll speed is also adjusted for these cases, so that the speed is not so high when the starting position of the scroll is within the
AUTOSCROLL_ACTIVE_OFFSET
.I confirmed that this does not break existing scroll behavior in tall containers / windows, and I added an example for this ("Scrolling container short"), but I'm not sure whether it's worth committing it or not. I included it so that you could easily test out the fixes here, @tajo.