phetsims / normal-modes

"Normal Modes" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 2 forks source link

VIEWBOX_WIDTH #52

Closed pixelzoom closed 4 years ago

pixelzoom commented 4 years ago

Noticed while working on #40.

In OneDimensionScreenView:

const VIEWBOX_WIDTH = 755 - 8;

I'm guessing that the - 8 was added when you were tweaking things. Unless there's some other significance to - 8, it would be better to change the value to 747. And document with something like:

// The distance between leftWall and rightWall, in view coordinates
const VIEWBOX_WIDTH = 747;
pixelzoom commented 4 years ago

Done in the above commit. Also renamed and tweaked the value.

const VIEW_SPRING_WIDTH = 745; // width of the spring, in view coordinates