Skip to content

Commit

Permalink
Move multilink and related methods to Multilink, see phetsims/axon#395
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 23, 2022
1 parent 7738ff8 commit 5623e07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/demo/patterns/view/PatternsScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
}
Expand Down
6 changes: 3 additions & 3 deletions js/vibrationManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 5623e07

Please sign in to comment.