[ ] Are all dependent Properties modeled as DerivedProperty instead of Property?
In TemperaturePointController.js:
// @public (read-only) {PaintColorProperty} is different from this.color where this.color is the point controller's
// color for the purposes of the other number-line classes; this colorProperty instead is just representative of
// the temperature of this point controller. No unlink necessary since all TemperaturePointControllers are present
// for the sim's lifetime.
this.colorProperty = new PaintColorProperty( NO_TEMPERATURE_COLOR );
this.positionProperty.link( () => {
if ( this.isControllingNumberLinePoint() ) {
this.colorProperty.value = temperatureToColorMap( this.numberLinePoints[ 0 ].valueProperty.value );
}
else {
this.colorProperty.value = NO_TEMPERATURE_COLOR;
}
} );
The only place that I seecolorProperty.valueset is in this observer. So it seems likecolorProperty ` should be derived, something like:
From code review #35:
In TemperaturePointController.js:
The only place that I see
colorProperty.valueset is in this observer. So it seems like
colorProperty ` should be derived, something like: