     onTouchEnd: (e) ->
       console.log 'onTouchEnd',e
 
-
       if @isDragging()
         if @shouldStartMomentum()
           @startMomentum()
         else
           @snapToBounds()
+
+    getContentOffsetY: () ->
+      style = document.defaultView.getComputedStyle(@element, null)
+      transform = new WebKitCSSMatrix(style.webkitTransform)
+      return transform.m42
 
     isDragging: () -> true
 

define ['jquery','cs!umobi.core'], ->

  $(->
    document.body.addEventListener('touchmove', ((e) ->
      # This prevents native scrolling from happening.
      e.preventDefault()

      @stopMomentum()
      @startTouchY = e.touches[0].clientY
      @startTouchTime = (new Date).getTime()
      @contentStartOffsetY = @getContentOffsetY()
      console.log( 'onTouchStart at', @startTouchY , 'Content start offset at', @contentStartOffsetY)

    onTouchMove: (e) ->
      return if not @isDragging
      console.log 'onTouchMove', { touchY: e.touches[0].clientY , contentStartOffsetY: @contentStartOffsetY }

      currentY = e.touches[0].clientY
      deltaY = currentY - @startTouchY
