Skip to content

Commit

Permalink
Fix workaround for bouncing a scroll content
Browse files Browse the repository at this point in the history
  • Loading branch information
scenee committed Feb 6, 2021
1 parent 34246d1 commit 11dfc0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Core.swift
Original file line number Diff line number Diff line change
Expand Up @@ -710,14 +710,14 @@ class Core: NSObject, UIGestureRecognizerDelegate {

// Workaround: Disable a tracking scroll to prevent bouncing a scroll content in a panel animating
let isScrollEnabled = scrollView?.isScrollEnabled
if let scrollView = scrollView, targetPosition != .full {
if let scrollView = scrollView, targetPosition != layoutAdapter.edgeMostState {
scrollView.isScrollEnabled = false
}

startAttraction(to: targetPosition, with: velocity)

// Workaround: Reset `self.scrollView.isScrollEnabled`
if let scrollView = scrollView, targetPosition != .full,
if let scrollView = scrollView, targetPosition != layoutAdapter.edgeMostState,
let isScrollEnabled = isScrollEnabled {
scrollView.isScrollEnabled = isScrollEnabled
}
Expand Down

0 comments on commit 11dfc0d

Please sign in to comment.