   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)

  toCanvasXCoord: (dataPoint) -> ((dataPoint - @smallestX) / (@largestX - @smallestX)) * @canvas.width

  toDataXCoord: (canvasPoint) -> (canvasPoint / @canvas.width) * (@largestX - @smallestX)

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

class Marks
  constructor: -> @all = []

    @element.addEventListener 'click', (e) => @canvasGraph.marks.remove(@) if e.layerY < 15

  draw: (e) ->
    markLeftX = Math.min @startingPoint, e.pageX
    markRightX = Math.max @startingPoint, e.pageX

