Skip to content

Commit

Permalink
rename PHMeterNodeAccordionBox.ts to PHAccordionBox, #242, #238
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Sep 6, 2022
1 parent 397577e commit c15a59b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2014-2022, University of Colorado Boulder

/**
* PHMeterNodeAccordionBox is the base class for the pH in the 'Micro' and 'My Solution' screens.
* PHAccordionBox is the base class for the pH in the 'Micro' and 'My Solution' screens.
* - Origin is at top left.
* - Can be expanded and collapsed.
* - Has a probe that extends down into the solution.
Expand Down Expand Up @@ -33,7 +33,7 @@ type SelfOptions = {

export type PHMeterNodeAccordionBoxOptions = SelfOptions & PickRequired<AccordionBoxOptions, 'tandem'>;

export default class PHMeterNodeAccordionBox extends AccordionBox {
export default class PHAccordionBox extends AccordionBox {

protected static readonly CORNER_RADIUS = 8;

Expand All @@ -54,7 +54,7 @@ export default class PHMeterNodeAccordionBox extends AccordionBox {
// AccordionBoxOptions
fill: PHScaleColors.PANEL_FILL,
lineWidth: 2,
cornerRadius: PHMeterNodeAccordionBox.CORNER_RADIUS,
cornerRadius: PHAccordionBox.CORNER_RADIUS,
contentYSpacing: 10,
titleAlignX: 'left',
titleXMargin: 15,
Expand Down Expand Up @@ -141,4 +141,4 @@ class ProbeNode extends Node {
}
}

phScale.register( 'PHMeterNodeAccordionBox', PHMeterNodeAccordionBox );
phScale.register( 'PHAccordionBox', PHAccordionBox );
6 changes: 3 additions & 3 deletions js/micro/view/MicroPHAccordionBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

import PHMeterNodeAccordionBox, { PHMeterNodeAccordionBoxOptions } from '../../common/view/PHMeterNodeAccordionBox.js';
import PHAccordionBox, { PHMeterNodeAccordionBoxOptions } from '../../common/view/PHAccordionBox.js';
import phScale from '../../phScale.js';
import { PHValue } from '../../common/model/PHModel.js';
import { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
Expand All @@ -21,7 +21,7 @@ type SelfOptions = EmptySelfOptions;

export type MicroPHAccordionBoxOptions = SelfOptions & PickRequired<PHMeterNodeAccordionBoxOptions, 'tandem'>;

export default class MicroPHAccordionBox extends PHMeterNodeAccordionBox {
export default class MicroPHAccordionBox extends PHAccordionBox {

/**
* @param pHProperty - pH of the solution
Expand All @@ -34,7 +34,7 @@ export default class MicroPHAccordionBox extends PHMeterNodeAccordionBox {

const contentNode = new NumberDisplay( pHProperty, PHScaleConstants.PH_RANGE, {
decimalPlaces: PHScaleConstants.PH_METER_DECIMAL_PLACES,
cornerRadius: PHMeterNodeAccordionBox.CORNER_RADIUS,
cornerRadius: PHAccordionBox.CORNER_RADIUS,
textOptions: {
font: new PhetFont( 28 ),
textPropertyOptions: { phetioHighFrequency: true }
Expand Down
4 changes: 2 additions & 2 deletions js/mysolution/view/MySolutionPHAccordionBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

import PHMeterNodeAccordionBox, { PHMeterNodeAccordionBoxOptions } from '../../common/view/PHMeterNodeAccordionBox.js';
import PHAccordionBox, { PHMeterNodeAccordionBoxOptions } from '../../common/view/PHAccordionBox.js';
import phScale from '../../phScale.js';
import { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import PickRequired from '../../../../phet-core/js/types/PickRequired.js';
Expand All @@ -18,7 +18,7 @@ type SelfOptions = EmptySelfOptions;

export type MySolutionPHAccordionBoxOptions = SelfOptions & PickRequired<PHMeterNodeAccordionBoxOptions, 'tandem'>;

export default class MySolutionPHAccordionBox extends PHMeterNodeAccordionBox {
export default class MySolutionPHAccordionBox extends PHAccordionBox {

/**
* @param pHProperty - pH of the solution
Expand Down

0 comments on commit c15a59b

Please sign in to comment.