Remove the velocity vector limit

This commit is contained in:
Shin Yamamoto
2019-07-19 18:51:33 +09:00
parent 2ef096b3a0
commit 020ffdaa84
+1 -1
View File
@@ -659,7 +659,7 @@ class FloatingPanel: NSObject, UIGestureRecognizerDelegate {
vc.delegate?.floatingPanelWillBeginDecelerating(vc)
let velocityVector = (distance != 0) ? CGVector(dx: 0, dy: min(abs(velocity.y)/distance, 30.0)) : .zero
let velocityVector = (distance != 0) ? CGVector(dx: 0, dy: abs(velocity.y)/distance) : .zero
let animator = behavior.interactionAnimator(vc, to: targetPosition, with: velocityVector)
animator.addAnimations { [weak self] in
guard let `self` = self else { return }