Skip to content

Commit

Permalink
Spring extends PhetioObject for phetioInstanceDocumentation, #58
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Malley <[email protected]>
  • Loading branch information
pixelzoom committed Jun 15, 2018
1 parent a49e6da commit 2ed580c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/common/model/Spring.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ define( function( require ) {
var HookesLawConstants = require( 'HOOKES_LAW/common/HookesLawConstants' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberProperty = require( 'AXON/NumberProperty' );
var PhetioObject = require( 'TANDEM/PhetioObject' );
var Range = require( 'DOT/Range' );
var RangeWithValue = require( 'DOT/RangeWithValue' );
var Tandem = require( 'TANDEM/Tandem' );
Expand Down Expand Up @@ -74,7 +75,8 @@ define( function( require ) {
appliedForceDelta: HookesLawConstants.APPLIED_FORCE_DELTA,

// phet-io
tandem: Tandem.required
tandem: Tandem.required,
phetioState: false // since this type has no inherent state to save, to avoid circular JSON error

}, options );

Expand Down Expand Up @@ -274,11 +276,13 @@ define( function( require ) {
// constrain to range
self.appliedForceProperty.set( self.appliedForceRange.constrainValue( appliedForce ) );
} );

PhetioObject.call( this, options );
}

hookesLaw.register( 'Spring', Spring );

return inherit( Object, Spring, {
return inherit( PhetioObject, Spring, {

// @public
reset: function() {
Expand Down

0 comments on commit 2ed580c

Please sign in to comment.