                                       didScrollToPageAtIndex index: Int,
                                       direction: PageboyViewController.NavigationDirection,
                                       animated: Bool) {
+        isScrollingAnimated = false
         self.updateBar(withPosition: CGFloat(index),
                        direction: direction)
     }

    
    // MARK: PageboyViewControllerDelegate
    
    open func pageboyViewController(_ pageboyViewController: PageboyViewController,
                                      willScrollToPageAtIndex index: Int,
                                      direction: PageboyViewController.NavigationDirection,

    /// Called after any layout changes.
    private func reloadBarWithCurrentPosition() {
        guard let currentPosition = self.currentPosition else { return }
        guard isScrollingAnimated == false else { return }
        
        let position = self.navigationOrientation == .horizontal ? currentPosition.x : currentPosition.y
        updateBar(withPosition: position, direction: .neutral)
