Skip to content

Commit

Permalink
no need to adjust x-axis tick labels for dynamic locale, #319
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Aug 27, 2022
1 parent a7568a4 commit 9c145fa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions js/common/view/population/PopulationGridNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class XTickLabels extends Node {
const numberOfLabels = getNumberOfVerticalLines( xRangeProperty.value, options.xSpacingModel );
const xSpacingView = getXSpacingView( xRangeProperty.value, options.xSpacingModel, options.xAxisWidth );

// Create a fixed number of labels. Their values and positions will be adjusted by xRangeProperty listener below.
// Create a fixed number of labels. Their numeric values and positions will be adjusted by xRangeProperty listener below.
const labelNodes = []; // {Text[]}
for ( let i = 0; i < numberOfLabels; i++ ) {
labelNodes.push( new Text( i, {
Expand All @@ -295,8 +295,6 @@ class XTickLabels extends Node {
const xModel = xOffsetModel + ( i * options.xSpacingModel );
labelNode.visible = xRange.contains( xModel );
if ( labelNode.visible ) {

//TODO https://github.com/phetsims/natural-selection/issues/319 use DerivedProperty
labelNode.text = xModel;
labelNode.centerX = xOffsetView + ( i * xSpacingView );
}
Expand Down

0 comments on commit 9c145fa

Please sign in to comment.