Skip to content

Commit

Permalink
opt out of linkedElement and rename checkbox Property to match conven…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Aug 20, 2020
1 parent 618ef1d commit 9853089
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ function Checkbox( content, property, options ) {
// phet-io
tandem: Tandem.REQUIRED,
phetioEventType: EventType.USER,
phetioLinkProperty: true, // whether a link to the checkbox's Property is created

// to support properly passing this to children, see https://github.com/phetsims/tandem/issues/60
phetioReadOnly: PhetioObject.DEFAULT_OPTIONS.phetioReadOnly,
phetioComponentOptions: null, // filled in below with PhetioObject.mergePhetioComponentOptions()
Expand Down Expand Up @@ -149,7 +151,7 @@ function Checkbox( content, property, options ) {
this.setExcludeLabelSiblingFromInput();

// must be after the Checkbox is instrumented
this.addLinkedElement( property, {
options.phetioLinkProperty && this.addLinkedElement( property, {
tandem: options.tandem.createTandem( 'property' )
} );

Expand Down

0 comments on commit 9853089

Please sign in to comment.