Skip to content

Commit

Permalink
Add getCurrentSceneData, see #193
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jun 23, 2023
1 parent 4187927 commit c2b9812
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/common/model/CAVModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import optionize from '../../../../phet-core/js/optionize.js';
import VoidIO from '../../../../tandem/js/types/VoidIO.js';
import ArrayIO from '../../../../tandem/js/types/ArrayIO.js';
import NumberIO from '../../../../tandem/js/types/NumberIO.js';
import ObjectLiteralIO from '../../../../tandem/js/types/ObjectLiteralIO.js';

type SelfOptions = {
instrumentMeanPredictionProperty: boolean;
Expand Down Expand Up @@ -176,6 +177,15 @@ const CAVModelIO = new IOType( 'CAVModelIO', {
return this.selectedSceneModelProperty.value.getSortedStackedObjects().map( soccerBall => soccerBall.valueProperty.value );
},
documentation: 'Gets the data points for the currently selected scene model.'
},

getCurrentSceneData: {
returnType: ObjectLiteralIO,
parameterTypes: [],
implementation: function( this: CAVModel ) {
return phet.phetio.phetioEngine.phetioStateEngine.getState( this.selectedSceneModelProperty.value );
},
documentation: 'Gets the PhET-iO state for the currently selected scene model.'
}
}
} );
Expand Down

0 comments on commit c2b9812

Please sign in to comment.