Skip to content

Commit

Permalink
Link soccerBallsEnabledProperty, phetsims/buoyancy#64
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed May 22, 2024
1 parent ec3ed14 commit 96b2d22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/view/SoccerBallNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import SoccerObjectNode, { SoccerObjectNodeOptions } from './SoccerObjectNode.js
import soccerCommon from '../soccerCommon.js';
import SoccerBall from '../model/SoccerBall.js';
import ModelViewTransform2 from '../../../phetcommon/js/view/ModelViewTransform2.js';
import TProperty from '../../../axon/js/TProperty.js';
import { DragListener, HighlightFromNode, Image, Node } from '../../../scenery/js/imports.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import Multilink from '../../../axon/js/Multilink.js';
Expand All @@ -23,6 +22,7 @@ import optionize, { EmptySelfOptions } from '../../../phet-core/js/optionize.js'
import { Shape } from '../../../kite/js/imports.js';
import SoccerCommonConstants from '../SoccerCommonConstants.js';
import EnabledProperty from '../../../axon/js/EnabledProperty.js';
import ReadOnlyProperty from '../../../axon/js/ReadOnlyProperty.js';

type SelfOptions = EmptySelfOptions;
type SoccerBallNodeOptions = SelfOptions & SoccerObjectNodeOptions;
Expand All @@ -31,7 +31,7 @@ export default class SoccerBallNode extends SoccerObjectNode {

public constructor( soccerBall: SoccerBall,
modelViewTransform: ModelViewTransform2,
soccerBallsEnabledProperty: TProperty<boolean>,
soccerBallsEnabledProperty: ReadOnlyProperty<boolean>,
providedOptions: SoccerBallNodeOptions ) {

// Use the y dimension, since it determines how the soccer balls stack. But maintain the same aspect ratio as the image
Expand Down Expand Up @@ -144,6 +144,7 @@ export default class SoccerBallNode extends SoccerObjectNode {
} );

this.addLinkedElement( soccerBall );
this.addLinkedElement( soccerBallsEnabledProperty );

super.addDebugText( soccerBall );
}
Expand Down

1 comment on commit 96b2d22

@zepumph
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.