                 
             }
             
+            print("layoutAttributesForElements \(attribute.indexPath.section)frame  \(attribute.frame) - \(percent) %")
+
             attribute.transform3D = transform
             
             layoutAttributes.append(attribute)
         }
+ 
         return layoutAttributes
         
     }

    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        itemSize = CGSize(width: 300, height: 300)
        

    }
    
    override func prepare() {

        
        scrollDirection = .horizontal
        collectionView?.decelerationRate = UIScrollViewDecelerationRateNormal

    }
    
    override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint {
        var newOffset = CGPoint()
        
        let layout = collectionView!.collectionViewLayout as! AJMFlowLayout
        
        let firstItemPosX = layoutAttributesForItem(at: IndexPath(item: 0, section: 0))!.frame.origin.x
        let secondItemPosX = layoutAttributesForItem(at: IndexPath(item: 0, section: 1))!.frame.origin.x
        
        let spacing = secondItemPosX - firstItemPosX - itemSize.width

        let width = itemSize.width + spacing
        print("\(spacing)")
        var offset = proposedContentOffset.x
        print("Imprimiendo \(velocity) \(width) - \(offset)")

