Skip to content

Commit

Permalink
rename instance doc to phetioDocumentation, phetsims/tandem#63
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Oct 4, 2018
1 parent bca97ec commit 65db49e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion js/AquaRadioButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ define( function( require ) {
// @private - converted to an AXON/Property from a property to support PhET-iO
this.enabledProperty = new BooleanProperty( options.enabled, {
tandem: options.tandem.createTandem( 'enabledProperty' ),
phetioInstanceDocumentation: 'Determines whether the AquaRadioButton is enabled (pressable) or disabled (grayed-out)'
phetioDocumentation: 'Determines whether the AquaRadioButton is enabled (pressable) or disabled (grayed-out)'
} );

// selected node creation
Expand Down
10 changes: 5 additions & 5 deletions js/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define( function( require ) {
tandem: Tandem.required,
phetioEventType: 'user',
phetioReadOnly: PhetioObject.DEFAULT_OPTIONS.phetioReadOnly, // to support properly passing this to children, see https://github.com/phetsims/tandem/issues/60
phetioInstanceDocumentation: '', // different default than PhetioObject, see implementation below
phetioDocumentation: '', // different default than PhetioObject, see implementation below

// a11y
tagName: 'input',
Expand Down Expand Up @@ -88,20 +88,20 @@ define( function( require ) {
this.enabledProperty = options.enabledProperty || new BooleanProperty( true, {
tandem: options.tandem.createTandem( 'enabledProperty' ),
phetioReadOnly: options.phetioReadOnly,
phetioInstanceDocumentation: 'When disabled, the checkbox is grayed out and cannot be pressed.'
phetioDocumentation: 'When disabled, the checkbox is grayed out and cannot be pressed.'
} );

// (phet-io) document the instrumented Property that this Checkbox manipulates
options.phetioInstanceDocumentation +=
options.phetioDocumentation +=
' This checkbox controls the PropertyIO.<BooleanIO>: ' +
'<a href="#' + phetio.PhetioIDUtils.getDOMElementID( property.tandem.phetioID ) + '">' + property.tandem.phetioID + '</a>';
options.phetioInstanceDocumentation = options.phetioInstanceDocumentation.trim(); // eliminate preceding whitespace, if any.
options.phetioDocumentation = options.phetioDocumentation.trim(); // eliminate preceding whitespace, if any.


// @private - sends out notifications when the checkbox is toggled.
var toggledEmitter = new Emitter( {
tandem: options.tandem.createTandem( 'toggledEmitter' ),
phetioInstanceDocumentation: 'Emits when user input causes the checkbox to toggle, emitting a single arg: the new boolean value of the checkbox state.',
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( [ BooleanIO ] )
Expand Down
4 changes: 2 additions & 2 deletions js/buttons/ButtonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ define( function( require ) {
phetioState: options.phetioState,
phetioReadOnly: options.phetioReadOnly,
tandem: options.tandem.createTandem( 'enabledProperty' ),
phetioInstanceDocumentation: 'When disabled, the button is grayed out and cannot be pressed'
phetioDocumentation: 'When disabled, the button is grayed out and cannot be pressed'
} );

// @private - keep track of and store all listeners this model creates
Expand Down Expand Up @@ -118,7 +118,7 @@ define( function( require ) {
var self = this;

options = _.extend( {
phetioInstanceDocumentation: 'Indicates when the button has been pressed or released',
phetioDocumentation: 'Indicates when the button has been pressed or released',
canStartPress: function() {
return self.enabledProperty.value;
}
Expand Down
4 changes: 2 additions & 2 deletions js/buttons/MomentaryButtonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ define( function( require ) {
// @private
this.pressedEmitter = new Emitter( {
tandem: options.tandem.createTandem( 'pressedEmitter' ),
phetioInstanceDocumentation: 'Emits when the button is pressed',
phetioDocumentation: 'Emits when the button is pressed',
phetioReadOnly: options.phetioReadOnly
} );

// @private
this.releasedEmitter = new Emitter( {
tandem: options.tandem.createTandem( 'releasedEmitter' ),
phetioInstanceDocumentation: 'Emits when the button is released',
phetioDocumentation: 'Emits when the button is released',
phetioReadOnly: options.phetioReadOnly
} );

Expand Down
2 changes: 1 addition & 1 deletion js/buttons/PushButtonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define( function( require ) {
// @private - sends out notifications when the button is released.
this.firedEmitter = new Emitter( {
tandem: options.tandem.createTandem( 'firedEmitter' ),
phetioInstanceDocumentation: 'Emits when the button is fired',
phetioDocumentation: 'Emits when the button is fired',
phetioReadOnly: options.phetioReadOnly,
phetioEventType: 'user'
} );
Expand Down
2 changes: 1 addition & 1 deletion js/buttons/RadioButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ define( function( require ) {
yAlign: options.buttonContentYAlign,
minWidth: widestContentWidth + 2 * options.buttonContentXMargin,
minHeight: tallestContentHeight + 2 * options.buttonContentYMargin,
phetioInstanceDocumentation: currentContent.phetioInstanceDocumentation || null // this null should be the default in PhetioObject
phetioDocumentation: currentContent.phetioDocumentation || null // this null should be the default in PhetioObject
}, buttonOptions );

// Pass through the tandem given the tandemName, but also support uninstrumented simulations
Expand Down
2 changes: 1 addition & 1 deletion js/buttons/RadioButtonGroupMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ define( function( require ) {
// @private
this.firedEmitter = new Emitter( {
tandem: options.tandem.createTandem( 'firedEmitter' ),
phetioInstanceDocumentation: 'Emits when the radio button is pressed',
phetioDocumentation: 'Emits when the radio button is pressed',
phetioReadOnly: options.phetioReadOnly,
phetioEventType: 'user'
} );
Expand Down
2 changes: 1 addition & 1 deletion js/buttons/StickyToggleButtonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ define( function( require ) {
this.valueProperty = valueProperty;
this.toggledEmitter = new Emitter( {
tandem: options.tandem.createTandem( 'toggledEmitter' ),
phetioInstanceDocumentation: 'Emits when the button is toggled',
phetioDocumentation: 'Emits when the button is toggled',
phetioEventType: 'user'
} );

Expand Down
2 changes: 1 addition & 1 deletion js/buttons/ToggleButtonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ define( function( require ) {
// @private
this.toggledEmitter = new Emitter( {
tandem: options.tandem.createTandem( 'toggledEmitter' ),
phetioInstanceDocumentation: 'Emits when the button is toggled',
phetioDocumentation: 'Emits when the button is toggled',
phetioEventType: 'user'
} );

Expand Down

0 comments on commit 65db49e

Please sign in to comment.