     }
     
     private var trigerInsetTop: CGFloat {
-        return self.offsetFromTop + self.trigerInsetLength
+        if self.scrollDirection == .Vertical {
+            return self.offsetFromTop + self.trigerInsets.top
+        }else {
+            return self.offsetFromTop + self.trigerInsets.left
+        }
     }
     
     private var trigerInsetEnd: CGFloat {
-        return self.offsetFromTop + self.collectionViewLength - self.trigerInsetLength
+        if self.scrollDirection == .Vertical {
+            return self.offsetFromTop + self.collectionViewLength - self.trigerInsets.bottom
+        }else {
+            return self.offsetFromTop + self.collectionViewLength - self.trigerInsets.right
+        }
     }
     
     required init(coder aDecoder: NSCoder) {

    
    private var fakeCellCenter: CGPoint?
    
    private var trigerInsetLength: CGFloat = 150.0
    
    private var insetTop: CGFloat {
        let contentInset = self.collectionView!.contentInset

    override func prepareLayout() {
        super.prepareLayout()
        
        if let insets = self.datasource?.collectionView?(scrollTrigerEdgeInsetsInCollectionView: self.collectionView!) {
            self.trigerInsets = insets
        }
    }
    
    override func layoutAttributesForElementsInRect(rect: CGRect) -> [AnyObject]? {
