     @element.addEventListener 'click', (e) => @canvasGraph.marks.remove(@) if e.layerY < 15
 
   draw: (e) ->
-    markLeftX = Math.min @startingPoint, e.x
-    markRightX = Math.max @startingPoint, e.x
+    console.log "E", e
+    markLeftX = Math.min @startingPoint, e.pageX
+    markRightX = Math.max @startingPoint, e.pageX
 
     width = (Math.min (Math.max (Math.abs markRightX - markLeftX), MIN_WIDTH), MAX_WIDTH)
 

    @element.style.border =  '2px solid red'
    @element.style.borderTop =  '13px solid red'

    @startingPoint = e.x - MIN_WIDTH
    @dragging = false

    @element.addEventListener 'mouseover', (e) => @hovering = true

      @mark.dragging = true
      @mark.draw(e)

    canvas.addEventListener 'mousemove', (e) =>
      e.preventDefault()
      @mark?.onMouseMove(e)

    canvas.addEventListener 'mouseup', (e) =>
      e.preventDefault()
      @mark?.onMouseUp(e)

