panzoom
panzoom copied to clipboard
Possible to increase friction for momentum panning?
The smoothScroll
behavior looks quite different than e.g. scrolling on a touch device, in that the area that moving area takes longer to come to rest.
Without resorting to setting smoothScroll: false
, which would make movement stop immediately, I would like to make it stop sooner, as if the hypothetical surface on which the movement is happening had higher friction.
I've played with the amplitude
and minVelocity
settings for kinetic
(admittedly, without understanding them), but wasn't able to achieve it. Is there a other way?
I know this is a late reply but I found a solution that will work.
In the kinetic portion of the code try lowering the timeConstant variable.
var timeConstant = 342;
150 was the sweet spot for my liking.