phetsims / trig-tour

"Trig Tour" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/trig-tour
GNU General Public License v3.0
2 stars 2 forks source link

Unnecessary model variable in UnitCircleView #54

Closed jessegreenberg closed 9 years ago

jessegreenberg commented 9 years ago

The top of the constructor for UnitCircleView looks like

  function UnitCircleView( model ) {

    var unitCircleView = this;
    this.model = model;
    var trigLabModel = model;

Would it be safe to delete var trigLabModel = model and replace references of trigLabModel with model? model is already available throughout the scope of the constructor, and it a little confusing for UnitCircleView to have both private and public variables for model

jessegreenberg commented 9 years ago

It looks like this.model is not needed in extended scope in UnitCircleView, so I deleted both this.model and var TrigLabModel and renamed model of the constructor parameter to trigTourModel for clarification. Closing.