From 36feb93b453fdd7ca907c250593c16ed3010e886 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Mon, 23 May 2022 16:53:26 -0600 Subject: [PATCH] Move multilink and related methods to Multilink, see https://github.com/phetsims/axon/issues/395 --- js/common/view/HistogramNode.js | 6 +++--- js/lab/view/StatisticsAccordionBox.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/common/view/HistogramNode.js b/js/common/view/HistogramNode.js index 8e24173..5d915f3 100644 --- a/js/common/view/HistogramNode.js +++ b/js/common/view/HistogramNode.js @@ -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'; @@ -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 } ); @@ -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() ); diff --git a/js/lab/view/StatisticsAccordionBox.js b/js/lab/view/StatisticsAccordionBox.js index 5e23d93..e627e87 100644 --- a/js/lab/view/StatisticsAccordionBox.js +++ b/js/lab/view/StatisticsAccordionBox.js @@ -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'; @@ -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' );