         }
         
         if circulating {
-            //            let multiplier = Int(self.width / (itemSize.width + itemSpace))
-            //            var remainder = self.width - (itemSize.width + itemSpace) * CGFloat(multiplier)
-            //
-            //            if 0 < remainder && remainder < 1 {
-            //                // ignore tiny space
-            //                remainder = 0
-            //            }
-            //            if remainder > 0 {
-            //                dummyCount = multiplier + 1
-            //            } else if remainder == 0 {
-            //                dummyCount = multiplier
-            //            } else {
-            //                loge("check calculation logic")
-            //            }
             dummyCount = itemCount
             if dummyCount >= 1 {
                 dummyWidth = CGFloat(dummyCount) * (itemSize.width + itemSpace)

        log("\(#function)")
        
        initialized = false
        collectionView!.size = self.size
        
        // calculate for view presentation
        calculate()
        
        // refresh frame
        var collectionSize = CGSizeZero
        if let itemSize = self.itemSize {
            if itemSize.height < self.height {
                collectionSize = CGSizeMake(self.width, itemSize.height)
                collectionView!.size = collectionSize
                logw("HFSwipeView height should be equal to its item size. requested height(\(self.height)) != item height(\(itemSize.height)).")
            }
        }
        

            log("\(#function)[\(self.tag)]: ignore at dummy area")
            return
        }
        if lastScrolledPosition.x < scrollView.contentOffset.x {
            scrollDirection = .Right
        } else if lastScrolledPosition.x > scrollView.contentOffset.x {
            scrollDirection = .Left
        }
        log("\(#function)[\(self.tag)]: lastX(\(lastScrolledPosition.x)), offset(\(scrollView.contentOffset.x)), scrollDirection: \(scrollDirection == .Left ? "Left" : "Right")")
        lastScrolledPosition = scrollView.contentOffset
    }
    
    private func determineDirection(withHorizontalVelocity velocity: CGFloat) {
        lastVelocity = velocity
        if lastVelocity > 0 {
            velocityDirection = .Right
        } else if lastVelocity < 0 {
            velocityDirection = .Left
        }
        log("\(#function)[\(self.tag)]: velocityDirection: \(velocityDirection == .Left ? "Left" : "Right")")
    }
    
    private func determineDirection(withTapPosition position: CGPoint) {
        tapDirection = position.x < self.width / 2 ? .Left : .Right
        log("\(#function)[\(self.tag)]: tapDirection: \(tapDirection == .Left ? "Left" : "Right")")
    }
}

