     $(@canvas).css('background-color', '#eee')
     @shapes = []
     @isDrawing = false
+    @position = {x: 0, y: 0}
     @repaint()
 
   beginDraw: (x, y) ->
     if @isDrawing
       @saveShape()
-
+    
+    x = x - @position.x
+    y = y - @position.y
     @isDrawing = true
     @currentShape = new LC.LinePathShape(@state)
     @currentShape.addPoint(x, y)

    coords = coordsForEvent($c, e)
    lc.endDraw(coords[0], coords[1])


class LC.LiterallyCanvasState



  continueDraw: (x, y) ->
    return unless @isDrawing
    x = x - @position.x
    y = y - @position.y
    @currentShape.addPoint(x, y)
    @repaint()

  endDraw: (x, y) ->
    return unless @isDrawing
    x = x - @position.x
    y = y - @position.y
    @isDrawing = false
    @currentShape.addPoint(x, y)
    @saveShape()
