Skip to content

Commit

Permalink
NumberProperty.range and rangeProperty cannot be of type null, phetsi…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Dec 3, 2022
1 parent 162c9a2 commit eeb26bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/common/model/CommonModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import createObservableArray, { ObservableArray } from '../../../../axon/js/crea
import Engine from './Engine.js';
import CenterOfMass from './CenterOfMass.js';
import Range from '../../../../dot/js/Range.js';
import NumberProperty, { RangedProperty } from '../../../../axon/js/NumberProperty.js';
import NumberProperty from '../../../../axon/js/NumberProperty.js';
import LabModes from './LabModes.js';
import ReadOnlyProperty from '../../../../axon/js/ReadOnlyProperty.js';
import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
Expand Down Expand Up @@ -80,7 +80,7 @@ abstract class CommonModel<EngineType extends Engine = Engine> {
public readonly moreDataProperty;
public readonly realUnitsProperty;

public readonly zoomLevelProperty: RangedProperty;
public readonly zoomLevelProperty: NumberProperty;
public readonly zoomProperty: ReadOnlyProperty<number>;
public readonly isLab: boolean;
public readonly labModeProperty: EnumerationProperty<LabModes>;
Expand Down Expand Up @@ -226,7 +226,7 @@ abstract class CommonModel<EngineType extends Engine = Engine> {
range: new Range( 0, 4 ),
tandem: providedOptions.tandem.createTandem( 'zoomLevelProperty' ),
numberType: 'Integer'
} ).asRanged();
} );
this.zoomProperty = new DerivedProperty( [ this.zoomLevelProperty ], zoomLevel => {
return Utils.linear( 0, 4, 0.5, 1.25, zoomLevel );
} );
Expand Down

0 comments on commit eeb26bd

Please sign in to comment.