Skip to content

Commit

Permalink
Change sync data button, see: #3
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Jun 3, 2022
1 parent b9cfea0 commit bd97620
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions js/common/view/MeanShareAndBalanceScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ import meanShareAndBalance from '../../meanShareAndBalance.js';
import MeanShareAndBalanceModel from '../model/MeanShareAndBalanceModel.js';
import optionize from '../../../../phet-core/js/optionize.js';
import PickRequired from '../../../../phet-core/js/types/PickRequired.js';
import ResetButton from '../../../../scenery-phet/js/buttons/ResetButton.js';
import { AlignBox, GridBox, VBox } from '../../../../scenery/js/imports.js';
import { AlignBox, GridBox, VBox, Text } from '../../../../scenery/js/imports.js';
import meanShareAndBalanceStrings from '../../meanShareAndBalanceStrings.js';
import merge from '../../../../phet-core/js/merge.js';
import QuestionBar from '../../../../scenery-phet/js/QuestionBar.js';
import Bounds2 from '../../../../dot/js/Bounds2.js';
import RectangularPushButton from '../../../../sun/js/buttons/RectangularPushButton.js';

type SelfOptions = {};

export type MeanShareAndBalanceScreenViewOptions = SelfOptions & PickRequired<ScreenViewOptions, 'tandem'>;

export default class MeanShareAndBalanceScreenView extends ScreenView {
readonly resetAllButton: ResetAllButton;
readonly syncDataButton: ResetButton;
readonly syncDataButton: RectangularPushButton;
readonly controlsAlignBox: AlignBox;
readonly controlsVBox: VBox;
readonly numberSpinnerVBox: VBox;
Expand All @@ -44,13 +44,15 @@ export default class MeanShareAndBalanceScreenView extends ScreenView {

const playAreaBounds = new Bounds2( this.layoutBounds.minX, this.layoutBounds.minY + this.questionBar.height, this.layoutBounds.maxX, this.layoutBounds.maxY );

this.syncDataButton = new ResetButton( {
// TODO: Draw sync icon.
this.syncDataButton = new RectangularPushButton( {
listener: () => {
this.interruptSubtreeInput(); // cancel interactions that may be in progress
model.syncData();
},
content: new Text( 'Sync Data' ),
right: this.layoutBounds.maxX - MeanShareAndBalanceConstants.CONTROLS_HORIZONTAL_MARGIN,
radius: 15,
baseColor: 'white',
tandem: options.tandem.createTandem( 'matchRepresentationsButton' ),
layoutOptions: { x: 0, y: 1, xAlign: 'left', minContentHeight: 175, yAlign: 'top' }
} );
Expand Down

0 comments on commit bd97620

Please sign in to comment.