Skip to content

Commit

Permalink
Fixed: medianScreen should not need a link here, see #45
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 4, 2022
1 parent 1395276 commit c582c6b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions js/common/view/MeanOrMedianScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ class MeanOrMedianScreenView extends SoccerScreenView {
maxWidth: 300
} );

// TODO: medianScreen should not need a link here
CASConstants.PLOT_TYPE_PROPERTY.link( plotType => {
if ( options.isMedianScreen ) {
titleNode.text = centerAndSpreadStrings.distanceInMeters;
}
else {
if ( options.isMedianScreen ) {
titleNode.text = centerAndSpreadStrings.distanceInMeters;
}
else {
CASConstants.PLOT_TYPE_PROPERTY.link( plotType => {
titleNode.text = plotType === PlotType.LINE_PLOT ? centerAndSpreadStrings.linePlot : centerAndSpreadStrings.dotPlot;
}
} );
} );
}

this.accordionBox = new CASAccordionBox( this.model, this.accordionBoxContents, this.topCheckboxPanel,
titleNode,
Expand Down

0 comments on commit c582c6b

Please sign in to comment.