     else
       @element.style.cursor = "move"
 
-  onMouseMove: (e) ->
+  onMouseMove: (e) =>
     e.preventDefault()
     @draw(e) if @dragging
     @move(e) if @moving
     @updateCursor(e) if @hovering
 
-  onMouseDown: (e) ->
+  onMouseDown: (e) =>
     e.preventDefault()
+
+    console.log "E from onmousedown", e
     @element.parentNode.appendChild(@element) #move to end of container for z index
     if (Math.abs @pointerXInElement(e) - (@canvasXMax-@canvasXMin)) < 10
       @startingPoint = @canvasXMin

    @startingPoint = @toCanvasXPoint(e) - MIN_WIDTH
    @dragging = false

    @element.addEventListener 'mouseover', (e) => @hovering = true
    @element.addEventListener 'mouseout', (e) => @hovering = false
    @element.addEventListener 'mousedown', (e) => @onMouseDown(e)
    @element.addEventListener 'click', (e) => @canvasGraph.marks.remove(@) if @pointerYInElement(e) < 15
    window.addEventListener 'mousemove', (e) => @onMouseMove(e)
    window.addEventListener 'mouseup', (e) => @onMouseUp(e)

  draw: (e) ->
    markLeftX = Math.min @startingPoint, @toCanvasXPoint(e)

    @dataXMin = @canvasGraph.toDataXCoord(@canvasXMin)
    @dataXMax = @canvasGraph.toDataXCoord(@canvasXMax)

  updateCursor: (e) =>
    if @pointerYInElement(e) < 15
      @element.style.cursor = "pointer"
    else if ((Math.abs @pointerXInElement(e) - (@canvasXMax-@canvasXMin)) < 10) || @pointerXInElement(e) < 10
