diff --git a/js/quadrilateral/model/QuadrilateralShapeModel.ts b/js/quadrilateral/model/QuadrilateralShapeModel.ts index 63764791..f752743d 100644 --- a/js/quadrilateral/model/QuadrilateralShapeModel.ts +++ b/js/quadrilateral/model/QuadrilateralShapeModel.ts @@ -37,6 +37,7 @@ import IReadOnlyProperty from '../../../../axon/js/IReadOnlyProperty.js'; import EnumerationProperty from '../../../../axon/js/EnumerationProperty.js'; import NumberIO from '../../../../tandem/js/types/NumberIO.js'; import IProperty from '../../../../axon/js/IProperty.js'; +import Multilink from '../../../../axon/js/Multilink.js'; // A useful type for calculations for the vertex Shapes which define where the Vertex can move depending on // the positions of the other vertices. Lines are along the bounds of model space and RayIntersections @@ -393,7 +394,7 @@ class QuadrilateralShapeModel { } } ); - Property.multilink( [ + Multilink.multilink( [ this.vertexA.positionProperty, this.vertexB.positionProperty, this.vertexC.positionProperty, diff --git a/js/quadrilateral/view/CornerGuideNode.ts b/js/quadrilateral/view/CornerGuideNode.ts index 462ac590..14366ec1 100644 --- a/js/quadrilateral/view/CornerGuideNode.ts +++ b/js/quadrilateral/view/CornerGuideNode.ts @@ -25,8 +25,8 @@ import Vector2 from '../../../../dot/js/Vector2.js'; import QuadrilateralColors from '../../common/QuadrilateralColors.js'; import BooleanProperty from '../../../../axon/js/BooleanProperty.js'; import QuadrilateralShapeModel from '../model/QuadrilateralShapeModel.js'; -import Property from '../../../../axon/js/Property.js'; import NamedQuadrilateral from '../model/NamedQuadrilateral.js'; +import Multilink from '../../../../axon/js/Multilink.js'; // constants // The size of each slice of the angle guide, in radians @@ -60,7 +60,7 @@ class CornerGuideNode extends Node { lineDash: [ 5, 5 ] } ); - Property.multilink( [ vertex1.angleProperty, vertex1.positionProperty ], ( angle, position ) => { + Multilink.multilink( [ vertex1.angleProperty, vertex1.positionProperty ], ( angle, position ) => { assert && assert( angle !== null, 'angleProperty needs to be defined to add listeners in CornerGuideNode' ); assert && assert( angle! > 0, 'CornerGuideNodes cannot support angles at or less than zero' ); const vertexCenter = vertex1.positionProperty.value; @@ -135,7 +135,7 @@ class CornerGuideNode extends Node { // listeners - This Node is only visible when "Angle Guides" are visible by the user and the angle is NOT a right // angle. In that case, the RightAngleIndicatorNode will display the angle. - Property.multilink( [ visibleProperty, shapeModel.shapeNameProperty ], ( visible, shapeName ) => { + Multilink.multilink( [ visibleProperty, shapeModel.shapeNameProperty ], ( visible, shapeName ) => { const currentShape = shapeModel.shapeNameProperty.value; this.visible = visible && currentShape !== NamedQuadrilateral.SQUARE && currentShape !== NamedQuadrilateral.RECTANGLE; } ); diff --git a/js/quadrilateral/view/ParallelsStaccatoSoundView.ts b/js/quadrilateral/view/ParallelsStaccatoSoundView.ts index 63513358..5a9fb0d8 100644 --- a/js/quadrilateral/view/ParallelsStaccatoSoundView.ts +++ b/js/quadrilateral/view/ParallelsStaccatoSoundView.ts @@ -4,7 +4,7 @@ * @author Jesse Greenberg (PhET Interactive Simulations) */ -import Property from '../../../../axon/js/Property.js'; +import Multilink from '../../../../axon/js/Multilink.js'; import LinearFunction from '../../../../dot/js/LinearFunction.js'; import Range from '../../../../dot/js/Range.js'; import optionize from '../../../../phet-core/js/optionize.js'; @@ -74,7 +74,7 @@ class ParallelsStaccatoSoundView { }; quadrilateralShapeModel.shapeChangedEmitter.addListener( shapeChangeListener ); - const leftRightMultilink = Property.multilink( + const leftRightMultilink = Multilink.multilink( [ quadrilateralShapeModel.leftSide.tiltProperty, quadrilateralShapeModel.rightSide.tiltProperty ], ( leftTilt, rightTilt ) => { assert && assert( leftTilt !== Number.POSITIVE_INFINITY && rightTilt !== Number.POSITIVE_INFINITY, 'tilts cannot be infinite in the sound design' ); @@ -82,7 +82,7 @@ class ParallelsStaccatoSoundView { this.leftRightRelativePitch = TILT_DIFFERENCE_TO_PITCH.evaluate( Math.abs( leftTilt - rightTilt ) ); } ); - const topBottomMultilink = Property.multilink( + const topBottomMultilink = Multilink.multilink( [ quadrilateralShapeModel.topSide.tiltProperty, quadrilateralShapeModel.bottomSide.tiltProperty ], ( topTilt, bottomTilt ) => { assert && assert( topTilt !== Number.POSITIVE_INFINITY && bottomTilt !== Number.POSITIVE_INFINITY, 'tilts cannot be infinite in the sound design' ); @@ -101,8 +101,8 @@ class ParallelsStaccatoSoundView { this.model.quadrilateralShapeModel.shapeChangedEmitter.removeListener( shapeChangeListener ); this.model.resetNotInProgressProperty.unlink( resetListener ); - Property.unmultilink( leftRightMultilink ); - Property.unmultilink( topBottomMultilink ); + Multilink.unmultilink( leftRightMultilink ); + Multilink.unmultilink( topBottomMultilink ); }; } diff --git a/js/quadrilateral/view/ParallelsVolumeSoundView.ts b/js/quadrilateral/view/ParallelsVolumeSoundView.ts index 9882aa80..2bcd57f9 100644 --- a/js/quadrilateral/view/ParallelsVolumeSoundView.ts +++ b/js/quadrilateral/view/ParallelsVolumeSoundView.ts @@ -10,14 +10,13 @@ * @author Jesse Greenberg (PhET Interactive Simulations) */ -import Property from '../../../../axon/js/Property.js'; import LinearFunction from '../../../../dot/js/LinearFunction.js'; import SoundClipChord from '../../../../tambo/js/sound-generators/SoundClipChord.js'; import soundManager from '../../../../tambo/js/soundManager.js'; import quadrilateral from '../../quadrilateral.js'; import QuadrilateralModel from '../model/QuadrilateralModel.js'; import QuadrilateralSoundOptionsModel, { SuccessSoundFile } from '../model/QuadrilateralSoundOptionsModel.js'; -import { UnknownMultilink } from '../../../../axon/js/Multilink.js'; +import Multilink, { UnknownMultilink } from '../../../../axon/js/Multilink.js'; import Side from '../model/Side.js'; import WrappedAudioBuffer from '../../../../tambo/js/WrappedAudioBuffer.js'; @@ -118,7 +117,7 @@ class ParallelsVolumeSoundView { soundManager.removeSoundGenerator( this.leftRightSideGenerator ); this.leftRightSideGenerator.dispose(); - Property.unmultilink( this.leftRightSideMultilink! ); + Multilink.unmultilink( this.leftRightSideMultilink! ); } if ( this.topBottomSideGenerator ) { assert && assert( this.topBottomSideMultilink, 'The multilink must be established before we dispose of it.' ); @@ -126,7 +125,7 @@ class ParallelsVolumeSoundView { soundManager.removeSoundGenerator( this.topBottomSideGenerator ); this.topBottomSideGenerator.dispose(); - Property.unmultilink( this.topBottomSideMultilink! ); + Multilink.unmultilink( this.topBottomSideMultilink! ); } } @@ -217,7 +216,7 @@ class ParallelsVolumeSoundView { * difference in tilts of two sides. */ public createTiltMultilink( sideA: Side, sideB: Side, applyOutputLevel: ( outputLevel: number ) => void ): UnknownMultilink { - return Property.multilink( + return Multilink.multilink( [ sideA.tiltProperty, sideB.tiltProperty ], ( leftTilt, rightTilt ) => { diff --git a/js/quadrilateral/view/QuadrilateralNode.ts b/js/quadrilateral/view/QuadrilateralNode.ts index 1048796e..5c38c1f3 100644 --- a/js/quadrilateral/view/QuadrilateralNode.ts +++ b/js/quadrilateral/view/QuadrilateralNode.ts @@ -19,7 +19,7 @@ import CornerGuideNode from './CornerGuideNode.js'; import QuadrilateralColors from '../../common/QuadrilateralColors.js'; import NamedQuadrilateral from '../model/NamedQuadrilateral.js'; import RightAngleIndicatorNode from './RightAngleIndicatorNode.js'; -import Property from '../../../../axon/js/Property.js'; +import Multilink from '../../../../axon/js/Multilink.js'; // constants const cornerAString = quadrilateralStrings.a11y.cornerA; @@ -170,7 +170,7 @@ class QuadrilateralNode extends Node { // only if shape identification feedback is enabled, reset the timer so that we change the color for a short // period when we become a named shape - Property.multilink( [ this.quadrilateralShapeModel.isParallelogramProperty, this.quadrilateralShapeModel.shapeNameProperty ], ( isParallelogram, shapeName ) => { + Multilink.multilink( [ this.quadrilateralShapeModel.isParallelogramProperty, this.quadrilateralShapeModel.shapeNameProperty ], ( isParallelogram, shapeName ) => { if ( shapeName !== null && quadrilateralModel.shapeIdentificationFeedbackEnabledProperty.value ) { this.remainingTimeForShapeChangeFill = SHAPE_FILL_TIME; } diff --git a/js/quadrilateral/view/SideLengthAreaNode.ts b/js/quadrilateral/view/SideLengthAreaNode.ts index cee4670d..80b00c06 100644 --- a/js/quadrilateral/view/SideLengthAreaNode.ts +++ b/js/quadrilateral/view/SideLengthAreaNode.ts @@ -14,8 +14,8 @@ import { Shape } from '../../../../kite/js/imports.js'; import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js'; import QuadrilateralShapeModel from '../model/QuadrilateralShapeModel.js'; import QuadrilateralUtils from '../../common/QuadrilateralUtils.js'; -import Property from '../../../../axon/js/Property.js'; import optionize from '../../../../phet-core/js/optionize.js'; +import Multilink from '../../../../axon/js/Multilink.js'; type SideLengthAreaNodeSelfOptions = { drawRotation?: number; @@ -42,7 +42,7 @@ class SideLengthAreaNode extends Node { this.children = [ vertex1Path, vertex2Path ]; - Property.multilink( [ + Multilink.multilink( [ shapeModel.lengthsEqualToSavedProperty, dragSide.isPressedProperty, dragSide.vertex1.isPressedProperty, diff --git a/js/quadrilateral/view/SideNode.ts b/js/quadrilateral/view/SideNode.ts index 0df900db..1673b414 100644 --- a/js/quadrilateral/view/SideNode.ts +++ b/js/quadrilateral/view/SideNode.ts @@ -8,7 +8,6 @@ * @author Jesse Greenberg (PhET Interactive Simulations) */ -import Property from '../../../../axon/js/Property.js'; import merge from '../../../../phet-core/js/merge.js'; import { DragListener, KeyboardDragListener, Line as LineNode, Path, SceneryEvent, Voicing } from '../../../../scenery/js/imports.js'; import Tandem from '../../../../tandem/js/Tandem.js'; @@ -23,6 +22,7 @@ import { Line, Shape } from '../../../../kite/js/imports.js'; import QuadrilateralColors from '../../common/QuadrilateralColors.js'; import vibrationManager from '../../../../tappi/js/vibrationManager.js'; import SideDescriber from './SideDescriber.js'; +import Multilink from '../../../../axon/js/Multilink.js'; // The dilation around side shapes when drawing the focus highlight. const FOCUS_HIGHLIGHT_DILATION = 15; @@ -85,7 +85,7 @@ class SideNode extends Voicing( Path, 1 ) { const lineNode = new LineNode( 0, 0, 0, 0 ); // listeners - Property.multilink( [ side.vertex1.positionProperty, side.vertex2.positionProperty ], ( vertex1Position, vertex2Position ) => { + Multilink.multilink( [ side.vertex1.positionProperty, side.vertex2.positionProperty ], ( vertex1Position, vertex2Position ) => { // create a single line that will then be divided into segments const fullLine = new Line( vertex1Position, vertex2Position );