From 020ffdaa84333d598558554abe5cbffef5c96c02 Mon Sep 17 00:00:00 2001 From: Shin Yamamoto Date: Tue, 16 Jul 2019 22:00:44 +0900 Subject: [PATCH] Remove the velocity vector limit --- Framework/Sources/FloatingPanel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Framework/Sources/FloatingPanel.swift b/Framework/Sources/FloatingPanel.swift index 3ed82a9..7557140 100644 --- a/Framework/Sources/FloatingPanel.swift +++ b/Framework/Sources/FloatingPanel.swift @@ -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 }