     e.preventDefault()
     if (Math.abs e.layerX - (@domXMax-@domXMin)) < 10
       @startingPoint = @domXMin
-      @dragging = true
+      @resizing = true
     else if e.layerX < 10
       @startingPoint = @domXMax
-      @dragging = true
+      @resizing = true
     else if e.layerY > 15
       @moving = true
       @pointerOffset = (e.x-@domXMin)

    markRightX = Math.max @startingPoint, e.x

    @element.style.left = (Math.min markLeftX, markRightX) + "px"
    @element.style.width = (Math.abs markRightX - markLeftX) + "px"

    @save(markLeftX, markRightX)


    @all = []

class Mark
  MIN_WIDTH = 10

  constructor: (e, @canvasGraph) ->
    #TODO: make an active state
    @canvas = @canvasGraph.canvas
