Skip to content

Commit

Permalink
Create VSMScreenView - see #7
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-blackman committed Nov 20, 2023
1 parent e99ec76 commit 3f4bbe0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
26 changes: 26 additions & 0 deletions js/common/view/VSMScreenView.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2023, University of Colorado Boulder

import { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import { ScreenViewOptions } from '../../../../joist/js/ScreenView.js';
import { PDLScreenView } from './PDLScreenView.js';
import VSMModel from '../model/VSMModel.js';
import projectileDataLab from '../../projectileDataLab.js';

/**
* ScreenView for the Variability, Sources and Measures (VSM) screens on the Projectile Data Lab sim.
*
* @author Matthew Blackman (PhET Interactive Simulations)
* @author Sam Reid (PhET Interactive Simulations)
*/

type SelfOptions = EmptySelfOptions;
type VSMScreenViewOptions = SelfOptions & ScreenViewOptions;

export class VSMScreenView extends PDLScreenView {

public constructor( model: VSMModel, options: VSMScreenViewOptions ) {
super( model, options );
}
}

projectileDataLab.register( 'VSMScreenView', VSMScreenView );
4 changes: 2 additions & 2 deletions js/measures/view/MeasuresScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import { ScreenViewOptions } from '../../../../joist/js/ScreenView.js';
import projectileDataLab from '../../projectileDataLab.js';
import MeasuresModel from '../model/MeasuresModel.js';
import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import { PDLScreenView } from '../../common/view/PDLScreenView.js';
import SourcesLaunchPanel from '../../sources/view/SourcesLaunchPanel.js';
import FieldPanel from '../../common/view/FieldPanel.js';
import { ManualConstraint } from '../../../../scenery/js/imports.js';
import { VSMScreenView } from '../../common/view/VSMScreenView.js';

type SelfOptions = EmptySelfOptions;

type ProjectileDataLabScreenViewOptions = SelfOptions & ScreenViewOptions;

export default class MeasuresScreenView extends PDLScreenView {
export default class MeasuresScreenView extends VSMScreenView {

public constructor( model: MeasuresModel, providedOptions: ProjectileDataLabScreenViewOptions ) {
const options = optionize<ProjectileDataLabScreenViewOptions, SelfOptions, ScreenViewOptions>()( {}, providedOptions );
Expand Down
4 changes: 2 additions & 2 deletions js/sources/view/SourcesScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import { ScreenViewOptions } from '../../../../joist/js/ScreenView.js';
import projectileDataLab from '../../projectileDataLab.js';
import SourcesModel from '../model/SourcesModel.js';
import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import { PDLScreenView } from '../../common/view/PDLScreenView.js';
import SourcesLaunchPanel from './SourcesLaunchPanel.js';
import FieldPanel from '../../common/view/FieldPanel.js';
import { ManualConstraint } from '../../../../scenery/js/imports.js';
import { VSMScreenView } from '../../common/view/VSMScreenView.js';

type SelfOptions = EmptySelfOptions;

type ProjectileDataLabScreenViewOptions = SelfOptions & ScreenViewOptions;

export default class SourcesScreenView extends PDLScreenView {
export default class SourcesScreenView extends VSMScreenView {

public constructor( model: SourcesModel, providedOptions: ProjectileDataLabScreenViewOptions ) {
const options = optionize<ProjectileDataLabScreenViewOptions, SelfOptions, ScreenViewOptions>()( {}, providedOptions );
Expand Down
4 changes: 2 additions & 2 deletions js/variability/view/VariabilityScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import { ScreenViewOptions } from '../../../../joist/js/ScreenView.js';
import projectileDataLab from '../../projectileDataLab.js';
import VariabilityModel from '../model/VariabilityModel.js';
import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import { PDLScreenView } from '../../common/view/PDLScreenView.js';
import VariabilityLaunchPanel from './VariabilityLaunchPanel.js';
import FieldPanel from '../../common/view/FieldPanel.js';
import { ManualConstraint } from '../../../../scenery/js/imports.js';
import { VSMScreenView } from '../../common/view/VSMScreenView.js';

type SelfOptions = EmptySelfOptions;

type ProjectileDataLabScreenViewOptions = SelfOptions & ScreenViewOptions;

export default class VariabilityScreenView extends PDLScreenView {
export default class VariabilityScreenView extends VSMScreenView {

public constructor( model: VariabilityModel, providedOptions: ProjectileDataLabScreenViewOptions ) {
const options = optionize<ProjectileDataLabScreenViewOptions, SelfOptions, ScreenViewOptions>()( {}, providedOptions );
Expand Down

0 comments on commit 3f4bbe0

Please sign in to comment.