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 087134d commit 36feb93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions js/common/view/HistogramNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Martin Veillette (Berea College)
*/

import Property from '../../../../axon/js/Property.js';
import Multilink from '../../../../axon/js/Multilink.js';
import Utils from '../../../../dot/js/Utils.js';
import { Shape } from '../../../../kite/js/imports.js';
import PhetFont from '../../../../scenery-phet/js/PhetFont.js';
Expand Down Expand Up @@ -375,7 +375,7 @@ class XBannerNode extends Node {
} );

// no need to unlink, present for the lifetime of the sim
Property.multilink( [ numberOfRowsProperty, histogramModeProperty ], ( numberOfRows, histogramMode ) => {
Multilink.multilink( [ numberOfRowsProperty, histogramModeProperty ], ( numberOfRows, histogramMode ) => {
updateBanner( numberOfRows ); // update the placement of the vertical line separators
updateTextBanner( numberOfRows, histogramMode ); // update the text content of each bins
} );
Expand Down Expand Up @@ -471,7 +471,7 @@ class HistogramBarNode extends Node {
updateSampleAverageTriangle();

// no need to unlink , present for the lifetime of the sim
Property.multilink( [ model.numberOfRowsProperty, model.probabilityProperty, isTheoreticalHistogramVisibleProperty ],
Multilink.multilink( [ model.numberOfRowsProperty, model.probabilityProperty, isTheoreticalHistogramVisibleProperty ],
( numberOfRows, probability, isTheoreticalHistogramVisible ) => {
// update the sample histogram
updateHistogram( sampleHistogramRectanglesArray, model.histogram.getNormalizedSampleDistribution() );
Expand Down
4 changes: 2 additions & 2 deletions js/lab/view/StatisticsAccordionBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Martin Veillette (Berea College)
*/

import Property from '../../../../axon/js/Property.js';
import Multilink from '../../../../axon/js/Multilink.js';
import merge from '../../../../phet-core/js/merge.js';
import { HBox } from '../../../../scenery/js/imports.js';
import { Text } from '../../../../scenery/js/imports.js';
Expand Down Expand Up @@ -100,7 +100,7 @@ class StatisticsAccordionBox extends AccordionBox {
const theoreticalStandardDeviationText = new EquationNode( sigmaString, 0, OPTIONS_THEORETICAL );

// link is present for the life of the simulation, no need to dispose
Property.multilink(
Multilink.multilink(
[ model.numberOfRowsProperty, model.probabilityProperty ],
( numberOfRows, probability ) => {
assert && assert( Number.isInteger( numberOfRows ), 'the number of rows must be an integer' );
Expand Down

0 comments on commit 36feb93

Please sign in to comment.