       @element.style.webkitTransform = 'translate3d(0,' + newY + 'px, 0)'
       @contentOffsetY = newY
 
+    overBottomSnapLimit: (newY) ->
+      contentHeight = @getElementHeight(@element)
+      parentHeight  = @getElementHeight(@element.parentNode)
+      # console.log 'overBottomSnapLimit', (parentHeight - (contentHeight + newY)) , @snapBoundary
+      return (parentHeight - (contentHeight + newY)) >= @snapBoundary
+
     shouldStartMomentum: ->
       m = @calculateMomentum()
       return false if m.velocity < 1 and m.newY > 0
-      # return true if m.newY > @snapBoundery
+      return false if @overBottomSnapLimit(m.newY)
+
+      # return true if m.newY > @snapBoundary
       # @lastTouchY
       return true
 

  )

  class Scroller
    snapBoundery: 120
    snapDuration: 500
    constructor: (@element) ->


        # Set the element transform to where it is right now.
        @animateTo(transform.m42)

    getElementHeight: (el) -> parseInt(window.getComputedStyle(el).height)

    snapToBounds: () ->
      offsetY = @getContentOffsetY()
      if @overBottomSnapLimit(offsetY)
        contentHeight = @getElementHeight(@element)
        parentHeight  = @getElementHeight(@element.parentNode)
        @cubicBezierAnimateTo(@snapDuration, (parentHeight - contentHeight) )
      else
        @cubicBezierAnimateTo(@snapDuration,0)

    # keyframes [array]
    # name [string]
