diff --git a/js/intro/model/IntroModel.ts b/js/intro/model/IntroModel.ts index 324eb84e..ad5677a5 100644 --- a/js/intro/model/IntroModel.ts +++ b/js/intro/model/IntroModel.ts @@ -38,7 +38,7 @@ export default class IntroModel extends MeanShareAndBalanceModel { public readonly meanVisibleProperty: Property; public readonly tickMarksVisibleProperty: Property; - public readonly numberOfCupsProperty: NumberProperty; + public readonly numberOfCupsProperty: Property; public readonly meanPredictionProperty: Property; public readonly meanProperty: IReadOnlyProperty; @@ -321,7 +321,7 @@ export default class IntroModel extends MeanShareAndBalanceModel { * @param range - the allowed waterLevelProperty range in each cup * @param waterLevelProperty - The property tracking the water level in each cup's model. */ - private static constrainDelta( delta: number, range: Range, waterLevelProperty: NumberProperty ): number { + private static constrainDelta( delta: number, range: Range, waterLevelProperty: Property ): number { const newWaterLevel = waterLevelProperty.value + delta; const constrainedWaterLevel = range.constrainValue( newWaterLevel ); return constrainedWaterLevel - waterLevelProperty.value; @@ -334,7 +334,7 @@ export default class IntroModel extends MeanShareAndBalanceModel { * @param waterLevel - The current waterLevel * @param oldWaterLevel - The previous waterLevel */ - public changeWaterLevel( cup3DModel: WaterCup, adapterProperty: NumberProperty, waterLevel: number, oldWaterLevel: number ): void { + public changeWaterLevel( cup3DModel: WaterCup, adapterProperty: Property, waterLevel: number, oldWaterLevel: number ): void { // During reset we only want to specify the exact values of the adapterProperty and waterLevelProperties. // We do not want to compensate with waterLevel deltas. diff --git a/js/intro/model/WaterCup.ts b/js/intro/model/WaterCup.ts index 081136ca..74716bd5 100644 --- a/js/intro/model/WaterCup.ts +++ b/js/intro/model/WaterCup.ts @@ -46,7 +46,7 @@ export type WaterCupModelOptions = export default class WaterCup extends PhetioObject { // Whether the cup is enabled in view and data calculations - public readonly isActiveProperty: BooleanProperty; + public readonly isActiveProperty: Property; // The x and y positions for the cup in the view. public readonly position: Vector2; diff --git a/js/intro/view/PredictMeanSlider.ts b/js/intro/view/PredictMeanSlider.ts index 8c889ef6..444fe7b6 100644 --- a/js/intro/view/PredictMeanSlider.ts +++ b/js/intro/view/PredictMeanSlider.ts @@ -15,13 +15,11 @@ import meanShareAndBalance from '../../meanShareAndBalance.js'; import Vector2Property from '../../../../dot/js/Vector2Property.js'; import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js'; import Range from '../../../../dot/js/Range.js'; -import optionize from '../../../../phet-core/js/optionize.js'; -import { EmptySelfOptions } from '../../../../phet-core/js/optionize.js'; +import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js'; import MeanShareAndBalanceConstants from '../../common/MeanShareAndBalanceConstants.js'; import AccessibleSlider, { AccessibleSliderOptions } from '../../../../sun/js/accessibility/AccessibleSlider.js'; import Vector2 from '../../../../dot/js/Vector2.js'; import ShadedSphereNode from '../../../../scenery-phet/js/ShadedSphereNode.js'; -import NumberProperty from '../../../../axon/js/NumberProperty.js'; import WaterCup from '../model/WaterCup.js'; import Property from '../../../../axon/js/Property.js'; @@ -34,7 +32,7 @@ export default class PredictMeanSlider extends AccessibleSlider( Node, 0 ) { private readonly predictMeanHandle: Circle; private readonly dragListener: DragListener; - public constructor( meanPredictionProperty: Property, dragRange: Range, numberOfCupsProperty: NumberProperty, + public constructor( meanPredictionProperty: Property, dragRange: Range, numberOfCupsProperty: Property, getActive2DCups: () => Array, modelViewTransform: ModelViewTransform2, providedOptions: PredictMeanNodeOptions ) { const options = optionize()( { diff --git a/js/intro/view/WaterCup3DNode.ts b/js/intro/view/WaterCup3DNode.ts index 43a8aea1..53c4d3d2 100644 --- a/js/intro/view/WaterCup3DNode.ts +++ b/js/intro/view/WaterCup3DNode.ts @@ -29,12 +29,12 @@ type WaterCup3DNodeOptions = SelfOptions & StrictOmit; private readonly tickMarksVisibleProperty: Property; private readonly showTickMarksLink: ( isShowingTickMarks: boolean ) => void; public constructor( tickMarksVisibleProperty: Property, - changeWaterLevel: ( cup3DModel: WaterCup, adapterProperty: NumberProperty, waterLevel: number, oldWaterLevel: number ) => void, + changeWaterLevel: ( cup3DModel: WaterCup, adapterProperty: Property, waterLevel: number, oldWaterLevel: number ) => void, waterCup: WaterCup, modelViewTransform: ModelViewTransform2, providedOptions?: WaterCup3DNodeOptions ) { diff --git a/js/intro/view/WaterLevelTriangleNode.ts b/js/intro/view/WaterLevelTriangleNode.ts index 9de268fb..2d8109a0 100644 --- a/js/intro/view/WaterLevelTriangleNode.ts +++ b/js/intro/view/WaterLevelTriangleNode.ts @@ -13,7 +13,6 @@ import StrictOmit from '../../../../phet-core/js/types/StrictOmit.js'; import meanShareAndBalance from '../../meanShareAndBalance.js'; import { Node, NodeOptions } from '../../../../scenery/js/imports.js'; import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js'; -import NumberProperty from '../../../../axon/js/NumberProperty.js'; import VSlider from '../../../../sun/js/VSlider.js'; import MeanShareAndBalanceConstants from '../../common/MeanShareAndBalanceConstants.js'; import Range from '../../../../dot/js/Range.js'; @@ -29,7 +28,7 @@ export default class WaterLevelTriangleNode extends Node { //REVIEW why is waterLevelProperty not Property, as in VSlider? //REVIEW why is enabledRangeProperty not IReadOnlyProperty, as in VSlider trait AccessibleValueHandler? - public constructor( waterLevelProperty: NumberProperty, enabledRangeProperty: Property, height: number, + public constructor( waterLevelProperty: Property, enabledRangeProperty: Property, height: number, providedOptions?: WaterLevelTriangleNodeOptions ) { const options = optionize()( { cursor: 'pointer'