Skip to content

Commit

Permalink
Add phetioLinkProperty option to Checkbox, see #501 and phetsims/blac…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisklus committed Apr 23, 2019
1 parent 763832d commit ca74c28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ define( function( require ) {
phetioEventType: PhetioObject.EventType.USER,
// to support properly passing this to children, see https://github.com/phetsims/tandem/issues/60
phetioReadOnly: PhetioObject.DEFAULT_OPTIONS.phetioReadOnly,
phetioLinkProperty: true, // whether a link to the checkbox's Property is created

// a11y
tagName: 'input',
Expand All @@ -64,7 +65,7 @@ define( function( require ) {
// does this instance own enabledProperty?
var ownsEnabledProperty = !options.enabledProperty;

this.addLinkedElement( property, {
options.phetioLinkProperty && this.addLinkedElement( property, {
tandem: options.tandem.createTandem( 'property' )
} );

Expand Down

0 comments on commit ca74c28

Please sign in to comment.