Disallow interrupting the panel interaction while bouncing over the most expanded state (#652)

I decided to disallow interrupting panel interactions while bouncing over the most expanded state in order to fix the 2nd issue in #633, https://github.com/scenee/FloatingPanel/issues/633#issuecomment-2324666767.
This commit is contained in:
Shin Yamamoto
2024-11-09 13:16:47 +09:00
committed by GitHub
parent b6e8928b1a
commit b0fd0d4427
+1 -1
View File
@@ -561,7 +561,7 @@ class Core: NSObject, UIGestureRecognizerDelegate {
}
private func interruptAnimationIfNeeded() {
if let animator = self.moveAnimator, animator.isRunning {
if let animator = self.moveAnimator, animator.isRunning, 0 <= layoutAdapter.offsetFromMostExpandedAnchor {
os_log(msg, log: devLog, type: .debug, "the attraction animator interrupted!!!")
animator.stopAnimation(true)
endAttraction(false)