 
   onToggleFav: ->
     console.log 'fav toggled!'
-    @classification.favorite = !@classification.favorite
-    favButton = @el.find(".toggle-fav")[0]
-    if @isFaved
-      @isFaved = false
+    isFaved = @classification.favorite
+    if isFaved
+      @classification.favorite = false
       @el.find(".toggle-fav").removeClass("toggled")
       @notify('Removed from Favorites.')
     else
-      @isFaved = true
+      @classification.favorite = true
       @el.find(".toggle-fav").addClass("toggled")
       @notify('Added to Favorites.')
 

    # read json data
    $.getJSON jsonFile, (data) =>

      if @subject.metadata.synthetic_id?
        @calcKnownTransits(data)

      @canvasGraph?.marks.destroyAll()
      @marksContainer.appendChild(@canvas)

GuestObsContent            = require '../lib/guest_obs_content'

$ = window.jQuery

MAIN_SUBJECT_GROUP = "5417014a3ae7400bda000001"
SIMULATION_GROUP   = "5417014b3ae7400bda000002"

class Classifier extends BaseController
  className: 'classifier'
