diff --git a/js/building/model/ShapePiece.js b/js/building/model/ShapePiece.js index 30cdcff..982565e 100644 --- a/js/building/model/ShapePiece.js +++ b/js/building/model/ShapePiece.js @@ -9,6 +9,7 @@ */ import BooleanProperty from '../../../../axon/js/BooleanProperty.js'; +import Multilink from '../../../../axon/js/Multilink.js'; import NumberProperty from '../../../../axon/js/NumberProperty.js'; import Property from '../../../../axon/js/Property.js'; import Bounds2 from '../../../../dot/js/Bounds2.js'; @@ -96,7 +97,7 @@ class ShapePiece { // Handle rotational animation towards a target (if any) // No need to unlink, as we own the given Properties - Property.multilink( [ this.isUserControlledProperty, this.targetRotationProperty ], ( isUserControlled, targetRotation ) => { + Multilink.multilink( [ this.isUserControlledProperty, this.targetRotationProperty ], ( isUserControlled, targetRotation ) => { if ( isUserControlled ) { const currentRotation = this.rotationProperty.value; this.trueTargetRotation = Animator.modifiedEndAngle( currentRotation, this.targetRotationProperty.value ); diff --git a/js/building/view/NumberGroupNode.js b/js/building/view/NumberGroupNode.js index ae56853..05c78ab 100644 --- a/js/building/view/NumberGroupNode.js +++ b/js/building/view/NumberGroupNode.js @@ -7,15 +7,11 @@ */ import DerivedProperty from '../../../../axon/js/DerivedProperty.js'; -import Property from '../../../../axon/js/Property.js'; +import Multilink from '../../../../axon/js/Multilink.js'; import Vector2 from '../../../../dot/js/Vector2.js'; import { Shape } from '../../../../kite/js/imports.js'; import merge from '../../../../phet-core/js/merge.js'; -import { Line } from '../../../../scenery/js/imports.js'; -import { Node } from '../../../../scenery/js/imports.js'; -import { Path } from '../../../../scenery/js/imports.js'; -import { Rectangle } from '../../../../scenery/js/imports.js'; -import { Text } from '../../../../scenery/js/imports.js'; +import { Line, Node, Path, Rectangle, Text } from '../../../../scenery/js/imports.js'; import FractionsCommonConstants from '../../common/FractionsCommonConstants.js'; import FractionsCommonColors from '../../common/view/FractionsCommonColors.js'; import fractionsCommon from '../../fractionsCommon.js'; @@ -67,7 +63,7 @@ class NumberGroupNode extends GroupNode { lineWidth: 3, center: outline.center } ); - this.itemsToDispose.push( Property.multilink( [ spot.pieceProperty, spot.showNotAllowedProperty ], ( piece, notAllowed ) => { + this.itemsToDispose.push( Multilink.multilink( [ spot.pieceProperty, spot.showNotAllowedProperty ], ( piece, notAllowed ) => { if ( piece !== null ) { text.text = piece.number; text.center = outline.center; @@ -128,7 +124,7 @@ class NumberGroupNode extends GroupNode { this.numberGroup.hasDoubleDigitsProperty.link( this.fractionLineLengthListener ); // @private {function} - this.undoVisibilityListener = Property.multilink( [ numberGroup.hasPiecesProperty, this.isSelectedProperty ], ( hasPieces, isSelected ) => { + this.undoVisibilityListener = Multilink.multilink( [ numberGroup.hasPiecesProperty, this.isSelectedProperty ], ( hasPieces, isSelected ) => { this.returnButton.visible = hasPieces && isSelected; } ); this.itemsToDispose.push( this.undoVisibilityListener ); diff --git a/js/building/view/NumberPieceNode.js b/js/building/view/NumberPieceNode.js index 18e7b48..4487ce1 100644 --- a/js/building/view/NumberPieceNode.js +++ b/js/building/view/NumberPieceNode.js @@ -6,7 +6,7 @@ * @author Jonathan Olson */ -import Property from '../../../../axon/js/Property.js'; +import Multilink from '../../../../axon/js/Multilink.js'; import Vector2 from '../../../../dot/js/Vector2.js'; import merge from '../../../../phet-core/js/merge.js'; import { DragListener } from '../../../../scenery/js/imports.js'; @@ -74,7 +74,7 @@ class NumberPieceNode extends Node { } // @private {function} - this.visibilityListener = Property.multilink( [ + this.visibilityListener = Multilink.multilink( [ numberPiece.isUserControlledProperty, numberPiece.isAnimatingProperty ], ( isUserControlled, isAnimating ) => { diff --git a/js/building/view/ShapePieceNode.js b/js/building/view/ShapePieceNode.js index d4256c9..c2ef1f0 100644 --- a/js/building/view/ShapePieceNode.js +++ b/js/building/view/ShapePieceNode.js @@ -6,7 +6,7 @@ * @author Jonathan Olson */ -import Property from '../../../../axon/js/Property.js'; +import Multilink from '../../../../axon/js/Multilink.js'; import Vector2 from '../../../../dot/js/Vector2.js'; import { Shape } from '../../../../kite/js/imports.js'; import merge from '../../../../phet-core/js/merge.js'; @@ -120,7 +120,7 @@ class ShapePieceNode extends Node { } // @private {function} - this.visibilityListener = Property.multilink( [ + this.visibilityListener = Multilink.multilink( [ shapePiece.isUserControlledProperty, shapePiece.isAnimatingProperty ], ( isUserControlled, isAnimating ) => { diff --git a/js/intro/view/EqualityLabScreenView.js b/js/intro/view/EqualityLabScreenView.js index 56a0559..ee81eaf 100644 --- a/js/intro/view/EqualityLabScreenView.js +++ b/js/intro/view/EqualityLabScreenView.js @@ -7,7 +7,7 @@ */ import DerivedProperty from '../../../../axon/js/DerivedProperty.js'; -import Property from '../../../../axon/js/Property.js'; +import Multilink from '../../../../axon/js/Multilink.js'; import Vector2 from '../../../../dot/js/Vector2.js'; import MathSymbols from '../../../../scenery-phet/js/MathSymbols.js'; import PhetFont from '../../../../scenery-phet/js/PhetFont.js'; @@ -186,7 +186,7 @@ class EqualityLabScreenView extends ContainerSetScreenView { FractionsCommonColors.equalityLabColorProperty ], color => color.withAlpha( 0.8 ) ); - Property.multilink( [ model.representationProperty, model.showNumberLineProperty ], ( representation, showNumberLine ) => { + Multilink.multilink( [ model.representationProperty, model.showNumberLineProperty ], ( representation, showNumberLine ) => { representation = showNumberLine ? IntroRepresentation.NUMBER_LINE : representation; if ( representation !== lastRepresentation ) { containerNodes.forEach( containerNode => containerNode.dispose() ); diff --git a/js/intro/view/beaker/BeakerContainerNode.js b/js/intro/view/beaker/BeakerContainerNode.js index 5e868f3..e994db4 100644 --- a/js/intro/view/beaker/BeakerContainerNode.js +++ b/js/intro/view/beaker/BeakerContainerNode.js @@ -6,7 +6,7 @@ * @author Jonathan Olson */ -import Property from '../../../../../axon/js/Property.js'; +import Multilink from '../../../../../axon/js/Multilink.js'; import { DragListener } from '../../../../../scenery/js/imports.js'; import fractionsCommon from '../../../fractionsCommon.js'; import ContainerNode from '../ContainerNode.js'; @@ -21,7 +21,7 @@ class BeakerContainerNode extends ContainerNode { super( container, options ); // @private {Multilink} - this.multilink = Property.multilink( [ container.appearsFilledCellCountProperty, container.cells.lengthProperty ], ( numerator, denominator ) => { + this.multilink = Multilink.multilink( [ container.appearsFilledCellCountProperty, container.cells.lengthProperty ], ( numerator, denominator ) => { // Sanity, if these get modified out of order (very possible) numerator = Math.min( numerator, denominator ); diff --git a/js/intro/view/numberline/NumberLineNode.js b/js/intro/view/numberline/NumberLineNode.js index c36d041..766427f 100644 --- a/js/intro/view/numberline/NumberLineNode.js +++ b/js/intro/view/numberline/NumberLineNode.js @@ -7,7 +7,7 @@ */ import NumberProperty from '../../../../../axon/js/NumberProperty.js'; -import Property from '../../../../../axon/js/Property.js'; +import Multilink from '../../../../../axon/js/Multilink.js'; import Bounds2 from '../../../../../dot/js/Bounds2.js'; import Utils from '../../../../../dot/js/Utils.js'; import { Shape } from '../../../../../kite/js/imports.js'; @@ -174,7 +174,7 @@ class NumberLineNode extends Node { this.containerCountProperty.link( this.containerCountListener ); // @private {Multilink} - this.minorTickMultilink = Property.multilink( [ + this.minorTickMultilink = Multilink.multilink( [ denominatorProperty, containerCountProperty ], ( denominator, containerCount ) => { @@ -194,7 +194,7 @@ class NumberLineNode extends Node { } ); // @private {Multilink} - this.multipliedTickMultilink = Property.multilink( [ + this.multipliedTickMultilink = Multilink.multilink( [ denominatorProperty, containerCountProperty, options.multiplierProperty @@ -216,7 +216,7 @@ class NumberLineNode extends Node { } ); // @private {Multilink} - this.markerMultilink = Property.multilink( [ + this.markerMultilink = Multilink.multilink( [ numeratorProperty, denominatorProperty ], ( numerator, denominator ) => { diff --git a/js/matching/model/MatchingChallenge.js b/js/matching/model/MatchingChallenge.js index b895a73..21090a2 100644 --- a/js/matching/model/MatchingChallenge.js +++ b/js/matching/model/MatchingChallenge.js @@ -9,6 +9,7 @@ import BooleanProperty from '../../../../axon/js/BooleanProperty.js'; import Emitter from '../../../../axon/js/Emitter.js'; +import Multilink from '../../../../axon/js/Multilink.js'; import NumberProperty from '../../../../axon/js/NumberProperty.js'; import Property from '../../../../axon/js/Property.js'; import dotRandom from '../../../../dot/js/dotRandom.js'; @@ -192,7 +193,7 @@ class MatchingChallenge { // @private {Array.} this.lastFailedPair = []; - Property.multilink( this.scaleSpots.map( scaleSpot => scaleSpot.pieceProperty ), ( leftPiece, rightPiece ) => { + Multilink.multilink( this.scaleSpots.map( scaleSpot => scaleSpot.pieceProperty ), ( leftPiece, rightPiece ) => { if ( !leftPiece || !rightPiece ) { this.stateProperty.value = MatchingChallenge.State.NO_COMPARISON; }