     }
     
     open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        
         let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! FolioReaderPage
         
         cell.centerDelegate = delegate

            if totalPages > 0 { updateCurrentPage() }
        } else {
            let pageSize = isDirection(pageHeight, pageWidth)
            
            if let page = currentPage
                , page.webView.scrollView.contentOffset.forDirection()+pageSize! <= page.webView.scrollView.contentSize.forDirection() {
                let totalWebviewPages = Int(ceil(currentPage.webView.scrollView.contentSize.forDirection()/pageSize!))

                let pageState = ReaderState(current: webViewPage, total: totalWebviewPages)
                delegate?.center?(pageDidChanged: currentPage, current: pageState.current, total: pageState.total)
            }


        }
        
        scrollScrubber?.scrollViewDidEndDecelerating(scrollView)
