File tree 2 files changed +3
-7
lines changed
2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,9 @@ class Core: NSObject, UIGestureRecognizerDelegate {
209
209
contentOffset = scrollView? . contentOffset
210
210
}
211
211
212
+ if layoutAdapter. validStates. contains ( state) == false {
213
+ state = layoutAdapter. initialState
214
+ }
212
215
layoutAdapter. updateStaticConstraint ( )
213
216
layoutAdapter. activateLayout ( for: state, forceLayout: forceLayout)
214
217
@@ -725,7 +728,6 @@ class Core: NSObject, UIGestureRecognizerDelegate {
725
728
}
726
729
727
730
guard shouldAttract ( to: target) else {
728
- self . state = target
729
731
self . updateLayout ( to: target)
730
732
self . unlockScrollView ( )
731
733
// The `floatingPanelDidEndDragging(_:willAttract:)` must be called after the state property changes.
Original file line number Diff line number Diff line change @@ -782,12 +782,6 @@ class LayoutAdapter {
782
782
NSLayoutConstraint . activate ( constraint: self . fitToBoundsConstraint)
783
783
}
784
784
785
- var state = state
786
-
787
- if validStates. contains ( state) == false {
788
- state = layout. initialState
789
- }
790
-
791
785
// Recalculate the intrinsic size of a content view. This is because
792
786
// UIView.systemLayoutSizeFitting() returns a different size between an
793
787
// on-screen and off-screen view which includes
You can’t perform that action at this time.
0 commit comments