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

Distribute property callbacks in TrigTourScreenView #66

Closed jessegreenberg closed 8 years ago

jessegreenberg commented 8 years ago

Out of issue #65, I noticed that many of the property callbacks in TrigTourScreenView can be distributed to other view components. This should reduce the TrigTourScreenView filesize and the number of references to other view components. This would benefit the code, and could even improve performance.

jessegreenberg commented 8 years ago

Scratch that, this will not provide a performance benefit, these only involve view properties which are not updated every frame. This should still be done for code cleanliness

jessegreenberg commented 8 years ago

Properties were redistributed from the screenView to other view components. At this point, functions and variables can likely be made private now that they are no longer referenced in the TrigTourScreenView. I will go through and look for this next.

jessegreenberg commented 8 years ago

viewProperties.specialAnglesVisibleProperty of ReadoutDisplay.js should be handled in ReadoutNode.js

jessegreenberg commented 8 years ago

viewProperties.specialAnglesVisibleProperty of ReadoutDisplay.js should be handled in ReadoutNode.js

Done. Again, many values can now be made private in ReadoutNode.

Now that ReadoutNode is handling the visibility of its components, the file size has grown too large. It should be refactored for organization.

jessegreenberg commented 8 years ago

Done in the commits above. Property callbacks have been distributed to various view types so that the burden is taken away from the screen view and ReadoutNode.js. Closing.