From 5623e079e9c0c4bb35c5861dedc9185609be41ed Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Mon, 23 May 2022 16:54:48 -0600 Subject: [PATCH] Move multilink and related methods to Multilink, see https://github.com/phetsims/axon/issues/395 --- js/demo/patterns/view/PatternsScreenView.js | 4 ++-- js/vibrationManager.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/demo/patterns/view/PatternsScreenView.js b/js/demo/patterns/view/PatternsScreenView.js index 21107f8..e76b13c 100644 --- a/js/demo/patterns/view/PatternsScreenView.js +++ b/js/demo/patterns/view/PatternsScreenView.js @@ -4,8 +4,8 @@ * @author Jesse Greenberg */ -import Property from '../../../../../axon/js/Property.js'; import ScreenView from '../../../../../joist/js/ScreenView.js'; +import Multilink from '../../../../../axon/js/Multilink.js'; import PhetFont from '../../../../../scenery-phet/js/PhetFont.js'; import { Text } from '../../../../../scenery/js/imports.js'; import BooleanRectangularStickyToggleButton from '../../../../../sun/js/buttons/BooleanRectangularStickyToggleButton.js'; @@ -79,7 +79,7 @@ class PatternsScreenView extends ScreenView { tunesScene.visible = activePattern === PatternsModel.PatternSet.TUNES; } ); - Property.multilink( [ model.activePatternProperty, model.limitPatternsProperty ], ( activePattern, limit ) => { + Multilink.multilink( [ model.activePatternProperty, model.limitPatternsProperty ], ( activePattern, limit ) => { if ( activePattern === null ) { vibrationManager.stopVibrate(); } diff --git a/js/vibrationManager.js b/js/vibrationManager.js index bde0ded..846d7a6 100644 --- a/js/vibrationManager.js +++ b/js/vibrationManager.js @@ -19,8 +19,8 @@ */ import BooleanProperty from '../../axon/js/BooleanProperty.js'; +import Multilink from '../../axon/js/Multilink.js'; import EnumerationDeprecatedProperty from '../../axon/js/EnumerationDeprecatedProperty.js'; -import Property from '../../axon/js/Property.js'; import stepTimer from '../../axon/js/stepTimer.js'; import EnumerationDeprecated from '../../phet-core/js/EnumerationDeprecated.js'; import tappi from './tappi.js'; @@ -101,12 +101,12 @@ class VibrationManager { this.setVibrationIntensity( this.intensityProperty.get() ); // if either vibration or intensity changes we need to stop/start vibration or change timeouts for intensity - Property.multilink( [ this.vibratingProperty, this.intensityProperty ], ( vibrating, intensity ) => { + Multilink.multilink( [ this.vibratingProperty, this.intensityProperty ], ( vibrating, intensity ) => { this.controlNavigator(); } ); // stop all vibration when the sim is invisible or inactive - Property.multilink( [ this.enabledProperty, simVisibleProperty, simActiveProperty ], ( enabled, simVisible, simActive ) => { + Multilink.multilink( [ this.enabledProperty, simVisibleProperty, simActiveProperty ], ( enabled, simVisible, simActive ) => { if ( enabled && simVisible && simActive ) { this.stopVibrate(); }