Adjust velocity factor
This commit is contained in:
@@ -138,7 +138,7 @@ function ImageViewing({
|
|||||||
if (Math.abs(e.velocityY) > 1000) {
|
if (Math.abs(e.velocityY) > 1000) {
|
||||||
dismissSwipeTranslateY.value = withDecay({
|
dismissSwipeTranslateY.value = withDecay({
|
||||||
velocity: e.velocityY,
|
velocity: e.velocityY,
|
||||||
velocityFactor: 2,
|
velocityFactor: Math.max(3000 / Math.abs(e.velocityY), 1), // Speed up if it's too slow.
|
||||||
deceleration: 1, // Danger! This relies on the reaction below stopping it.
|
deceleration: 1, // Danger! This relies on the reaction below stopping it.
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user