 
   transform: (event) ->
     touchProp = if event.type == 'touchend' then 'changedTouches' else 'touches'
-    
+
     if event[touchProp] && event[touchProp][0]
       ex = {}
       ex[touchProp] = _.map(event[touchProp], (t) => @_transformEventParams(t) )
       $.extend($.Event(event.type), ex)
     else
       $.extend($.Event(event.type), @_transformEventParams(event))
-    
+
   _transformEventParams: (e) ->
     offsetTop = @canvas.wrapperEl.getBoundingClientRect().top
     offsetLeft = @canvas.wrapperEl.getBoundingClientRect().left

      pageY: e.pageY - @translate().y,
      screenX: e.screenX - @translate().x,
      screenY: e.screenY - @translate().y
    }

  # need some work
  _adjustPositionAfterZoom: (newZoom) ->
    width = @canvas.width
    height = @canvas.height
    @position.x += ((@zoom * width) - (newZoom * width)) / 2;
    @position.y += ((@zoom * height) - (newZoom * height)) / 2;

  translate: () ->
    {
