Skip to content

Commit

Permalink
updates to FireListener instrumentation, phetsims/scenery#1676
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Dec 13, 2024
1 parent c43710c commit f03d623
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion js/AquaRadioButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ export default class AquaRadioButton<T> extends WidthSizable( Voicing( Node ) )
};
const fireListener = new FireListener( {
fire: fire,
tandem: options.tandem.createTandem( 'fireListener' )

// Purposefully no nesting here, because we want the firedEmitter at the top level, and we don't instrument the enabledProperty
tandem: options.tandem
} );
this.addInputListener( fireListener );

Expand Down
3 changes: 2 additions & 1 deletion js/Checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ export default class Checkbox extends WidthSizable( Voicing( Node ) ) {
}
},

tandem: options.tandem.createTandem( 'fireListener' )
// Purposefully no nesting here, because we want the firedEmitter at the top level, and we don't instrument the enabledProperty
tandem: options.tandem
} );
this.addInputListener( fireListener );

Expand Down
4 changes: 3 additions & 1 deletion js/MenuItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ export default class MenuItem extends WidthSizable( Voicing( Node ) ) {
} );

this.addInputListener( new FireListener( {
tandem: options.tandem?.createTandem( 'fireListener' ),

// Purposefully no nesting here, because we want the firedEmitter at the top level, and we don't instrument the enabledProperty
tandem: options.tandem,
fire: ( event: SceneryEvent ) => {
closeCallback( event );
callback( event );
Expand Down

0 comments on commit f03d623

Please sign in to comment.