     private var centerOnEndScroll = false
     
     // MARK: - init
-    
-    
     
     public init(frame: CGRect, itemAppearance: HexagonalItemViewAppearance) {
         self.itemAppearance = itemAppearance

    }
    
    private func transformView(view: HexagonalItemView) {
        let size = bounds.size
        let zoomScale = zoomScaleCache
        let insets = contentInset
        let spacing = itemAppearance.itemSize + itemAppearance.itemSpacing/2
        
        //convert the ivew rect in the contentView coordinate

        contentView.frame = contentsFrame
    }
    
    private func getDistanceToBorder(center center: CGPoint,distanceToBeOffset: CGFloat,insets: UIEdgeInsets) -> CGFloat {
        let size = bounds.size
        var	distanceToBorder: CGFloat = size.width
        
        //check if the view is close to the left
        //changing the distance to border and the offset accordingly
        let leftDistance = center.x - insets.left
        if leftDistance < distanceToBeOffset && leftDistance < distanceToBorder {
            distanceToBorder = leftDistance
        }
        
        //same for top
        let topDistance = center.y - insets.top
        if topDistance < distanceToBeOffset && topDistance < distanceToBorder {
            distanceToBorder = topDistance
        }
        
        //same for right
        let rightDistance = size.width - center.x - insets.right
        if rightDistance < distanceToBeOffset && rightDistance < distanceToBorder {
            distanceToBorder = rightDistance
        }
        
        //same for bottom
        let bottomDistance = size.height - center.y - insets.bottom
        if bottomDistance < distanceToBeOffset && bottomDistance < distanceToBorder {
            distanceToBorder = bottomDistance
        }
        
        return distanceToBorder*2
    }
    
    private func centerOnIndex(index: Int, zoomScale: CGFloat) {
        guard centerOnEndScroll else { return }
        centerOnEndScroll = false
