     # draw marks
     if @marks
       for mark in @marks.all
-        # scaledMin = ((mark.dataXMinRel - xMin) / (xMax - xMin)) * @canvas.width
-        # scaledMax = ((mark.dataXMaxRel - xMin) / (xMax - xMin)) * @canvas.width
         scaledMin = ((parseFloat(mark.dataXMinRel) + parseFloat(@toDays(@leftPadding)) - parseFloat(xMin) - parseFloat(val) ) / (parseFloat(xMax) - parseFloat(xMin)) ) * parseFloat(@canvas.width-@leftPadding)
         scaledMax = ((parseFloat(mark.dataXMaxRel) + parseFloat(@toDays(@leftPadding)) - parseFloat(xMin) - parseFloat(val) ) / (parseFloat(xMax) - parseFloat(xMin)) ) * parseFloat(@canvas.width-@leftPadding)
         #                                ^ prevents from moving towards left                          ^ prevents marks from moving towards right

# $ = window.jQuery

class CanvasGraph

  DEBUG = false

  disableMarking: ->
    # console.log 'CANVAS GRAPH: disableMarking()'
    @markingDisabled = true

  enableMarking: ->
    # console.log 'CANVAS GRAPH: enableMarking()'
