Open veillette opened 2 years ago
In order to use the Scenery-Phet gridcheckBox, I has to adjust the gridSize and gridStroke to match the least-squares-regression grid Icon.
// Create grid checkbox with grid icon
const gridCheckbox = new GridCheckbox( model.showGridProperty, {
gridSize: 48,
gridStroke: LeastSquaresRegressionConstants.MAJOR_GRID_STROKE_COLOR
} );
Making a visual comparison:
Using SceneryPhet/GridCheckBox
Using Least-Squares-Regression/GridIcon
One can notice a slight offset between the spacing of the checkbox and the grid icon.
Assigning to @amanda-phet to approve of the visual change.
@veillette this looks totally fine to me.
Could we see if the default GridCheckbox is adequate? I looked at two sims that use GridCheckbox (I think) and it looks pretty similar to this one. Was the main difference the stroke color? If so, maybe we should stick with the default color, for consistency between sims?
The main difference is the stroke color and the size (it is quite a bit larger than the default, 48 instead of 30). The default color is rgb( 100, 100, 100 ) for the gridCheckBox but least squares regression uses rgb( 128, 128, 128 ). However, that very same color is also used for the major grid stroke on the graph. I don't know if that affects your decision.
I included screenshots (with a portion of the graph with major stroke) for ease of comparison
With LSR size and color
with LSR size but gridcheckbox default color
with gridcheckbox default color and size
Let me know what you think. @amanda-phet
The GridIcon and its invocation in a checkbox should be replaced by the common code GridCheckbox. Discovered while working on https://github.com/phetsims/scenery-phet/issues/777