Compare commits

...

3 Commits

Author SHA1 Message Date
Shin Yamamoto dfa9a77816 Fix a miss spell 2025-04-21 20:18:12 +09:00
Shin Yamamoto afff000d8c Allow slight deviation when checking for anchor position.
This change addresses the 2nd issue reported in #633. The previous attempt
in commit b0fd0d4 was intended to fix this, but it has a regression.
This change resolves the issue without introducing any regressions.
2025-04-21 20:18:02 +09:00
Shin Yamamoto dd49fdea5e Revert "Disallow interrupting the panel interaction while bouncing over the most expanded state (#652)"
This reverts commit b0fd0d4427.

This change had a problem normal cases. For example, in Maps example a
panel interaction jumps occurs because of this.
2025-04-21 18:09:24 +09:00
2 changed files with 6 additions and 6 deletions
@@ -202,10 +202,10 @@ extension UseCaseController {
fpc.set(contentViewController: contentVC)
fpc.delegate = self
let apprearance = SurfaceAppearance()
apprearance.cornerRadius = 38.5
apprearance.shadows = []
fpc.surfaceView.appearance = apprearance
let appearance = SurfaceAppearance()
appearance.cornerRadius = 38.5
appearance.shadows = []
fpc.surfaceView.appearance = appearance
fpc.isRemovalInteractionEnabled = true
let mvc = UIViewController()
+2 -2
View File
@@ -563,7 +563,7 @@ class Core: NSObject, UIGestureRecognizerDelegate {
}
private func interruptAnimationIfNeeded() {
if let animator = self.moveAnimator, animator.isRunning, 0 <= layoutAdapter.offsetFromMostExpandedAnchor {
if let animator = self.moveAnimator, animator.isRunning {
os_log(msg, log: devLog, type: .debug, "the attraction animator interrupted!!!")
animator.stopAnimation(true)
endAttraction(false)
@@ -610,7 +610,7 @@ class Core: NSObject, UIGestureRecognizerDelegate {
guard
isScrollable(state: state), // When not top most(i.e. .full), don't scroll.
interactionInProgress == false, // When interaction already in progress, don't scroll.
0 == layoutAdapter.offset(from: state),
abs(layoutAdapter.offset(from: state)) < 1, // Indistinguishably close to an anchor point.
!surfaceView.grabberAreaContains(initialLocation) // When the initial point is within grabber area, don't scroll
else {
return false