   
   constructor: ->
     super
-
     isZoomed: false
     ifFaved: false
-
     @scaleSlider = new FauxRangeInput('#scale-slider')
 
     @canvas = @el.find('#graph')[0]

    console.log "onChangeScaleSlider()"
    console.log " value: ", focusCenter

    xMin = @canvasState.toDataXCoord(focusCenter-thumbWid/2)
    xMax = @canvasState.toDataXCoord(focusCenter+thumbWid/2)
    @canvasState.plotPoints(xMin,xMax)
  
  onClickZoom: ->
    @zoomed = !@zoomed
    if @zoomed then @canvasState.plotPoints(5,20) else @canvasState.plotPoints()

  onToggleZoom: ->
    zoomButton = @el.find("#toggle-zoom")[0]
    if @isZoomed
      @isZoomed = false
      zoomButton.innerHTML = '<img src="images/icons/toolbar-zoomplus.png">Zoom'
      @el.find("#toggle-zoom").removeClass("toggled")
    else
      @isZoomed = true
      zoomButton.innerHTML = '<img src="images/icons/toolbar-zoomminus.png">Zoom'
      @el.find("#toggle-zoom").addClass("toggled")

  onToggleFav: ->
    favButton = @el.find("#toggle-fav")[0]


    @canvasState = new CanvasGraph(@canvas, light_curve_data)
    @canvasState.plotPoints()

    console.log @canvasState.largestX
    @el.find("#scale-slider").attr "max", 1077 # should eventually be dynamic
