Skip to content

Commit

Permalink
required options can't have defaults in optionize defaults, phetsims/…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jan 9, 2023
1 parent 95862e5 commit 6216f38
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions js/buoyancy/model/BuoyancyShapesModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default class BuoyancyShapesModel extends DensityBuoyancyModel {

public constructor( providedOptions: BuoyancyShapesModelOptions ) {
const options = optionize<DensityBuoyancyModelOptions, EmptySelfOptions>()( {
// @ts-expect-error TODO JO: this looks like a typescript bug, and not a runtime problem, https://github.com/phetsims/chipper/issues/1360
initialForceScale: 1 / 4
}, providedOptions );

Expand Down
3 changes: 0 additions & 3 deletions js/common/model/Cuboid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Vector2 from '../../../../dot/js/Vector2.js';
import Vector3 from '../../../../dot/js/Vector3.js';
import { Shape } from '../../../../kite/js/imports.js';
import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import Tandem from '../../../../tandem/js/Tandem.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import densityBuoyancyCommon from '../../densityBuoyancyCommon.js';
import Mass, { InstrumentedMassOptions, MASS_MAX_SHAPES_DIMENSION, MASS_MIN_SHAPES_DIMENSION, MassIOStateObject } from './Mass.js';
Expand All @@ -38,8 +37,6 @@ export default class Cuboid extends Mass {
shape: Shape.rect( size.minX, size.minY, size.width, size.height ),
volume: size.width * size.height * size.depth,
massShape: MassShape.BLOCK,

tandem: Tandem.OPTIONAL,
phetioType: Cuboid.CuboidIO
}, providedConfig );

Expand Down
3 changes: 1 addition & 2 deletions js/common/view/DensityBuoyancyScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import arrayRemove from '../../../../phet-core/js/arrayRemove.js';
import optionize from '../../../../phet-core/js/optionize.js';
import PhetFont from '../../../../scenery-phet/js/PhetFont.js';
import ResetAllButton from '../../../../scenery-phet/js/buttons/ResetAllButton.js';
import { AlignBox, animatedPanZoomSingleton, TInputListener, Image, LinearGradient, Mouse, Node, Pointer, Rectangle, SceneryEvent, Text } from '../../../../scenery/js/imports.js';
import { AlignBox, animatedPanZoomSingleton, Image, LinearGradient, Mouse, Node, Pointer, Rectangle, SceneryEvent, Text, TInputListener } from '../../../../scenery/js/imports.js';
import Checkbox from '../../../../sun/js/Checkbox.js';
import EventType from '../../../../tandem/js/EventType.js';
import Tandem from '../../../../tandem/js/Tandem.js';
Expand Down Expand Up @@ -123,7 +123,6 @@ export default class DensityBuoyancyScreenView<Model extends DensityBuoyancyMode
cameraLookAt: DensityBuoyancyCommonConstants.BUOYANCY_CAMERA_LOOK_AT,
cameraPosition: new Vector3( 0, 0.2, 2 ).timesScalar( scaleIncrease ),
cameraZoom: 1.75 * scaleIncrease,
tandem: Tandem.REQUIRED,

preventFit: true
}, providedOptions );
Expand Down

0 comments on commit 6216f38

Please sign in to comment.