   // Gesture related properties.
   fileprivate var gesture: UIPanGestureRecognizer!
   fileprivate var gestureStartPosition: CGPoint = .zero
-  fileprivate var gestureTranslation: CGFloat = 0
   fileprivate enum Direction {
     case up, down
   }
   fileprivate var lastDirection = Direction.down
   
+  fileprivate let layout = GlidingLayout()
   fileprivate var lastExpandedItemIndex = 0
   fileprivate var animationInProcess = false
   fileprivate var animationViewsDictionary: [String: AniView] = [:]

      UIGraphicsEndImageContext()
      newCellWrapperView.addSubview(newCellSnapshotView)
      newCellWrapperView.isUserInteractionEnabled = false
      addSubview(newCellWrapperView)
      
      let imageViewOriginY = up ? -cellFrame.height : 0
      let wrapperViewOriginY = up ? cellFrame.maxY : cellFrame.minY

      switch item {
      case .oldRightSide:
        collectionView.isUserInteractionEnabled = true
      case .newCell where index == expandedItemIndex && aniview.animation.beginTime == anim.beginTime:
        let paths = collectionView.indexPathsForVisibleItems.sorted { $0.0.item < $0.1.item }
        guard let path = paths.first, let cell = collectionView.cellForItem(at: path) else {
