Skip to content

Commit

Permalink
Allow interval tool to be dragged 0..16, see #194
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 12, 2023
1 parent 59342b3 commit ce7732a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions js/common/CAVConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const CAVConstants = {
},

PHYSICAL_RANGE: new Range( 1, 15 ),
VARIABILITY_DRAG_RANGE: new Range( 0, 16 ),
MAX_KICKS_VALUES: [ 15, 20, 25, 30 ],

// TODO: I added to the height while the title bar doesn't allow overlap, see https://github.com/phetsims/center-and-variability/issues/170
Expand Down
4 changes: 2 additions & 2 deletions js/variability/model/VariabilityModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ export default class VariabilityModel extends CAVModel {
} );

this.intervalTool1ValueProperty = new NumberProperty( 2, {
range: CAVConstants.PHYSICAL_RANGE,
range: CAVConstants.VARIABILITY_DRAG_RANGE,
tandem: options.tandem.createTandem( 'intervalTool1ValueProperty' )
} );
this.intervalTool2ValueProperty = new NumberProperty( 3, {
range: CAVConstants.PHYSICAL_RANGE,
range: CAVConstants.VARIABILITY_DRAG_RANGE,
tandem: options.tandem.createTandem( 'intervalTool2ValueProperty' )
} );
}
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 @@ -54,7 +54,7 @@ export default class VariabilityScreenView extends CAVScreenView {

super( model, options );

this.contentLayer.addChild( new PredictionSlider( model.intervalTool1ValueProperty, this.modelViewTransform, CAVConstants.PHYSICAL_RANGE, {
this.contentLayer.addChild( new PredictionSlider( model.intervalTool1ValueProperty, this.modelViewTransform, CAVConstants.VARIABILITY_DRAG_RANGE, {
predictionThumbNodeOptions: {
color: CAVColors.intervalToolIconShadedSphereMainColorProperty
},
Expand All @@ -65,7 +65,7 @@ export default class VariabilityScreenView extends CAVScreenView {
tandem: options.tandem.createTandem( 'variabilityIntervalPredictionTool1ValueNode' )
} ) );

this.contentLayer.addChild( new PredictionSlider( model.intervalTool2ValueProperty, this.modelViewTransform, CAVConstants.PHYSICAL_RANGE, {
this.contentLayer.addChild( new PredictionSlider( model.intervalTool2ValueProperty, this.modelViewTransform, CAVConstants.VARIABILITY_DRAG_RANGE, {
predictionThumbNodeOptions: {
color: CAVColors.intervalToolIconShadedSphereMainColorProperty
},
Expand Down

0 comments on commit ce7732a

Please sign in to comment.