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

  MAX_WIDTH = 150

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

    @element = document.createElement('div')

    @ctx.translate(0,@canvas.height)
    @ctx.scale(1,-1)

  toDataXCoord: (domCoord) -> ((domCoord - @canvas.getBoundingClientRect().left)/ @canvas.width) * (@largestX - @smallestX)

  # TODO: fix the math on this one....
  toDomXCoord: (dataPoint) -> ((dataPoint) * (@largestX - @smallestX)) + @canvas.getBoundingClientRect().left

class Marks
  constructor: -> @all = []
