     @element.style.border =  '2px solid red'
     @element.style.borderTop =  '13px solid red'
 
-    @startingPoint = e.x - MIN_WIDTH
+    @startingPoint = e.pageX - MIN_WIDTH
     @dragging = false
 
     @element.addEventListener 'mouseover', (e) => @hovering = true

    @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

    width = (Math.min (Math.max (Math.abs markRightX - markLeftX), MIN_WIDTH), MAX_WIDTH)


    @save(markLeftX, markLeftX+width)

  move: (e) ->
    leftXPos = (e.pageX - @pointerOffset)
    @element.style.left = leftXPos + "px"
    @save(leftXPos, leftXPos+parseInt(@element.style.width, 10))

