From 292cc1c8e528f8e955dabbcf6ec068c15dd63f3e Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 27 Nov 2018 20:34:46 -0900 Subject: [PATCH] don't alert left/right when amplitude is not settled, https://github.com/phetsims/friction/issues/136 --- js/friction/view/describers/BookMovementDescriber.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/friction/view/describers/BookMovementDescriber.js b/js/friction/view/describers/BookMovementDescriber.js index 8f301460..9516f130 100644 --- a/js/friction/view/describers/BookMovementDescriber.js +++ b/js/friction/view/describers/BookMovementDescriber.js @@ -110,7 +110,10 @@ define( require => { // if both the left and right alerts haven't yet been alerted while separated if ( !this.separatedAlertPair.bothAlerted() ) { - this.alertDirections( direction ); + + if ( this.model.amplitudeProperty.value < FrictionModel.AMPLITUDE_SETTLED_THRESHOLD ) { + this.alertDirections( direction ); + } this.separatedAlertPair.updateFromDirection( direction ); }