 
   onExpandSimulationPanel: ->
     @settings.simulationPanelExpanded = true
-    @settings.modelReadyToRun = true
     @settings.modelIsRunning = true
     SimulationActions.resetSimulation.trigger()
     @notifyChange()
 
   onCollapseSimulationPanel: ->
     @settings.simulationPanelExpanded = false
-    @settings.modelReadyToRun = false
     @settings.modelIsRunning = false
+    @_stopRecording()
     @notifyChange()
 
   onGraphChanged: (data)->

      stepUnitsName: unitName
      timeUnitOptions: options
      capNodeValues: false
      modelIsRunning: false         # currently running?
      modelReadyToRun: true         # has been reset?
      # is the model valid?
      modelIsRunnable: @_checkModelIsRunnable()
      graphHasCollector: @_checkForCollectors()
      isRecording: false            # sending data to codap?


  onSimulationEnded: ->
    @settings.modelIsRunning = false
    @notifyChange()

  _startRecording: ->
