Skip to content

Commit

Permalink
factor out reusable typeIOs, phetsims/unit-rates#207
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 9, 2018
1 parent b0cbd63 commit 347415f
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 @@ -25,6 +25,7 @@ define( function( require ) {

// constants
var DISABLED_OPACITY = 0.3;
var CheckboxEmitterIO = EmitterIO( [ { name: 'isChecked', type: BooleanIO } ] );

/**
* @param {Node} content
Expand Down Expand Up @@ -102,7 +103,7 @@ define( function( require ) {
phetioDocumentation: 'Emits when user input causes the checkbox to toggle, emitting a single arg: the new boolean value of the checkbox state.',
phetioReadOnly: options.phetioReadOnly,
phetioEventType: 'user',
phetioType: EmitterIO( [ { name: 'isChecked', type: BooleanIO } ] ),
phetioType: CheckboxEmitterIO,
listener: function( value ) {
property.value = value;
}
Expand Down

1 comment on commit 347415f

@pixelzoom
Copy link
Contributor

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.