Skip to content

Commit

Permalink
export default class, see #88
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 15, 2023
1 parent 94236de commit df3444b
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 26 deletions.
5 changes: 2 additions & 3 deletions js/common/view/CenterOfMassNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import CenterOfMass from '../model/CenterOfMass.js';
import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js';
import SolarSystemCommonColors from '../../../../solar-system-common/js/SolarSystemCommonColors.js';

class CenterOfMassNode extends Node {
export default class CenterOfMassNode extends Node {
public constructor( centerOfMass: CenterOfMass, modelViewTransformProperty: TReadOnlyProperty<ModelViewTransform2> ) {
super( {
children: [
Expand All @@ -35,5 +35,4 @@ class CenterOfMassNode extends Node {
}
}

mySolarSystem.register( 'CenterOfMassNode', CenterOfMassNode );
export default CenterOfMassNode;
mySolarSystem.register( 'CenterOfMassNode', CenterOfMassNode );
6 changes: 2 additions & 4 deletions js/common/view/PathsCanvasNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type SelfOptions = EmptySelfOptions;
// constants
const STROKE_WIDTH = 3;

class PathsCanvasNode extends CanvasNode {
export default class PathsCanvasNode extends CanvasNode {
private readonly transformProperty: TReadOnlyProperty<ModelViewTransform2>;
private readonly bodies: Body[];

Expand Down Expand Up @@ -136,6 +136,4 @@ class PathsCanvasNode extends CanvasNode {
}
}

mySolarSystem.register( 'PathsCanvasNode', PathsCanvasNode );

export default PathsCanvasNode;
mySolarSystem.register( 'PathsCanvasNode', PathsCanvasNode );
1 change: 0 additions & 1 deletion js/common/view/ValuesColumnNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ type SelfOptions = {

export type ValuesColumnNodeOptions = SelfOptions & StrictOmit<VBoxOptions, 'children'>;


export default class ValuesColumnNode extends VBox {
public constructor( model: MySolarSystemModel, columnType: ValuesColumnTypes, providedOptions?: ValuesColumnNodeOptions ) {
const options = optionize<ValuesColumnNodeOptions, SelfOptions, VBoxOptions>()( {
Expand Down
5 changes: 2 additions & 3 deletions js/intro/IntroScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import IntroScreenIcon from './view/IntroScreenIcon.js';
import MySolarSystemStrings from '../MySolarSystemStrings.js';
import BasicActionsKeyboardHelpSection from '../../../scenery-phet/js/keyboard/help/BasicActionsKeyboardHelpSection.js';

class IntroScreen extends Screen<IntroModel, IntroScreenView> {
export default class IntroScreen extends Screen<IntroModel, IntroScreenView> {

public constructor( tandem: Tandem ) {

Expand All @@ -42,5 +42,4 @@ class IntroScreen extends Screen<IntroModel, IntroScreenView> {
}
}

mySolarSystem.register( 'IntroScreen', IntroScreen );
export default IntroScreen;
mySolarSystem.register( 'IntroScreen', IntroScreen );
5 changes: 2 additions & 3 deletions js/intro/model/IntroModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type SuperTypeOptions = MySolarSystemModelOptions;

export type IntroModelOptions = StrictOmit<SuperTypeOptions, 'engineFactory' | 'isLab'>;

class IntroModel extends MySolarSystemModel {
export default class IntroModel extends MySolarSystemModel {
public constructor( providedOptions: IntroModelOptions ) {
const options = optionize<IntroModelOptions, EmptySelfOptions, SuperTypeOptions>()( {
engineFactory: bodies => new NumericalEngine( bodies ),
Expand All @@ -37,5 +37,4 @@ class IntroModel extends MySolarSystemModel {
}
}

mySolarSystem.register( 'IntroModel', IntroModel );
export default IntroModel;
mySolarSystem.register( 'IntroModel', IntroModel );
5 changes: 2 additions & 3 deletions js/intro/view/IntroScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import MySolarSystemStrings from '../../MySolarSystemStrings.js';
type SelfOptions = EmptySelfOptions;
export type IntroScreenViewOptions = IntroLabScreenViewOptions;

class IntroScreenView extends MySolarSystemScreenView {
export default class IntroScreenView extends MySolarSystemScreenView {
public constructor( model: IntroModel, providedOptions: IntroScreenViewOptions ) {
const options = optionize<IntroScreenViewOptions, SelfOptions, IntroLabScreenViewOptions>()( {
// pdom
Expand Down Expand Up @@ -44,5 +44,4 @@ class IntroScreenViewSummaryContentNode extends Node {
}
}

mySolarSystem.register( 'IntroScreenView', IntroScreenView );
export default IntroScreenView;
mySolarSystem.register( 'IntroScreenView', IntroScreenView );
5 changes: 2 additions & 3 deletions js/lab/LabScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import LabScreenIcon from './view/LabScreenIcon.js';
import MySolarSystemStrings from '../MySolarSystemStrings.js';
import BasicActionsKeyboardHelpSection from '../../../scenery-phet/js/keyboard/help/BasicActionsKeyboardHelpSection.js';

class LabScreen extends Screen<LabModel, LabScreenView> {
export default class LabScreen extends Screen<LabModel, LabScreenView> {

public constructor( tandem: Tandem ) {

Expand All @@ -42,5 +42,4 @@ class LabScreen extends Screen<LabModel, LabScreenView> {
}
}

mySolarSystem.register( 'LabScreen', LabScreen );
export default LabScreen;
mySolarSystem.register( 'LabScreen', LabScreen );
5 changes: 2 additions & 3 deletions js/lab/model/LabModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type SuperTypeOptions = MySolarSystemModelOptions;

type LabModelOptions = StrictOmit<SuperTypeOptions, 'engineFactory' | 'isLab'>;

class LabModel extends MySolarSystemModel {
export default class LabModel extends MySolarSystemModel {
private readonly modeMap: Map<LabMode, BodyInfo[]>;
private readonly modeSetter: ( mode: LabMode ) => void;

Expand Down Expand Up @@ -157,5 +157,4 @@ class LabModel extends MySolarSystemModel {
}
}

mySolarSystem.register( 'LabModel', LabModel );
export default LabModel;
mySolarSystem.register( 'LabModel', LabModel );
5 changes: 2 additions & 3 deletions js/lab/view/LabScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { IntroScreenViewOptions } from '../../intro/view/IntroScreenView.js';
type SelfOptions = EmptySelfOptions;
export type LabScreenViewOptions = IntroLabScreenViewOptions;

class LabScreenView extends MySolarSystemScreenView {
export default class LabScreenView extends MySolarSystemScreenView {
public constructor( model: LabModel, providedOptions: LabScreenViewOptions ) {

const options = optionize<IntroScreenViewOptions, SelfOptions, IntroLabScreenViewOptions>()( {
Expand Down Expand Up @@ -54,5 +54,4 @@ class LabScreenViewSummaryContentNode extends Node {
}
}

mySolarSystem.register( 'LabScreenView', LabScreenView );
export default LabScreenView;
mySolarSystem.register( 'LabScreenView', LabScreenView );

0 comments on commit df3444b

Please sign in to comment.