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


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

  translate: () ->
    {

class fabric.Viewport
  constructor: (canvas) ->
    @i = 0
    @position = new fabric.Point(0,0)
    @zoom = 1
