Skip to content

Commit

Permalink
Remove unlinkAttribute, see phetsims/chipper#1313
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Aug 26, 2022
1 parent c6ed607 commit 0d19e4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/common/view/PointNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class PointNode extends Node {

// Add the label and link a listener for visibility.
this.addChild( pointLabelNode );
const labelVisibilityListener = numberLine.showPointLabelsProperty.linkAttribute( pointLabelNode, 'visible' );
const labelVisibilityListener = visible => {pointLabelNode.visible = visible;};
numberLine.showPointLabelsProperty.link( labelVisibilityListener );

// Move in front of other points when being dragged or when the point value is being changed by other means.
const moveToFrontMultilink = Multilink.multilink(
Expand Down Expand Up @@ -143,7 +144,7 @@ class PointNode extends Node {
* @private
*/
this.disposePointNode = () => {
numberLine.showPointLabelsProperty.unlinkAttribute( labelVisibilityListener );
numberLine.showPointLabelsProperty.unlink( labelVisibilityListener );
updatePointRepresentationMultilink.dispose();
moveToFrontMultilink.dispose();
pointLabelNode.dispose();
Expand Down

0 comments on commit 0d19e4b

Please sign in to comment.