phetsims / fractions-intro

"Fractions Intro" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
1 stars 3 forks source link

PROTO: Proto Model HardWired numerator and max init value #69

Closed coledu closed 7 years ago

coledu commented 7 years ago

The numerator and max should have the capabilities of handling different number other than 1 as the default value. For example if you change the max default value in the proto it should have 5 container on the screen. But right now it will only have 1. And the same go for numerator. This issue was created in response to a new branch name proto from #33 .

veillette commented 7 years ago

I forgot to tag the commit (4ccc870fa9d52161bf92d4f43e73b823fab04f6c)

veillette commented 7 years ago

In the first commit, I had left the values of numerator and denominator and max that I had used to test my change. The second commit restores the default value.

veillette commented 7 years ago

To summarize the change to the constructor is to set the appropriate initial value of container and filled cells. The addition to the code base is

    // initialize the model with the appropriate number of containers and number of filled cells
    this.onMaxChange( this.maxProperty.value, 0 );
    this.onNumeratorChange( this.numeratorProperty.value, 0 );

Assigning to @jonathanolson for review

jonathanolson commented 7 years ago

Sounds great, thanks!