From f09ed79e71117474eef0270cdfacc826a0f50b96 Mon Sep 17 00:00:00 2001 From: jbphet Date: Fri, 27 Sep 2019 17:06:02 -0600 Subject: [PATCH] prevented overlap in account values when set via buttons --- js/common/model/NumberLine.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/common/model/NumberLine.js b/js/common/model/NumberLine.js index 36a4043..4f6d0e3 100644 --- a/js/common/model/NumberLine.js +++ b/js/common/model/NumberLine.js @@ -100,7 +100,7 @@ define( require => { this.residentPoints.addItemAddedListener( addedPoint => { // listener to make sure point lands in a good point when released - const pointDragListener = dragging => { + const pointIsDraggingListener = dragging => { // do nothing if dragging or we are the only point here/there are no points here if ( dragging || this.getPointsAt( addedPoint.valueProperty.value ).length <= 1 ) { @@ -114,12 +114,12 @@ define( require => { } addedPoint.valueProperty.value = this.getNearestUnoccupiedValue( beginningValue ); }; - addedPoint.isDraggingProperty.link( pointDragListener ); + addedPoint.isDraggingProperty.link( pointIsDraggingListener ); // remove the listener when the point is removed from the number line this.residentPoints.addItemRemovedListener( removedPoint => { if ( removedPoint === addedPoint ) { - removedPoint.isDraggingProperty.unlink( pointDragListener ); + removedPoint.isDraggingProperty.unlink( pointIsDraggingListener ); } } ); } );