     
     // MARK: Snapshot of right side of collectionView
     if let path = paths[safe: 1], let cell = collectionView.cellForItem(at: path) {
+      self.newRightSideLayer?.removeFromSuperlayer()
       UIGraphicsBeginImageContextWithOptions(cell.bounds.size, true, 0)
       if let context = UIGraphicsGetCurrentContext() {
         cell.layer.render(in: context)

  
  private func setupPanGesture() {
    gesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanGesture(_:)))
    addGestureRecognizer(gesture)
  }
  

    case up, down
  }
  fileprivate var lastDirection = Direction.down
  
  fileprivate var lastExpandedItemIndex = 0
  fileprivate var animationInProcess = false
  fileprivate var animationLayersDictionary: [String: AniLayer] = [:]
  fileprivate var topOverlayGradient = CAGradientLayer()
