From f3b5d5d98c2e8ce0973f82accf8bf8452a0b699f Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 29 Mar 2022 16:46:26 -0600 Subject: [PATCH] Instrument the PreferencesDialog view, https://github.com/phetsims/joist/issues/744 --- js/buttons/StickyToggleButtonModel.js | 2 +- js/buttons/ToggleButtonModel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/buttons/StickyToggleButtonModel.js b/js/buttons/StickyToggleButtonModel.js index e92befc9..5915cba7 100644 --- a/js/buttons/StickyToggleButtonModel.js +++ b/js/buttons/StickyToggleButtonModel.js @@ -108,7 +108,7 @@ class StickyToggleButtonModel extends ButtonModel { this.downProperty.unlink( downListener ); this.enabledProperty.unlink( enabledPropertyOnListener ); valueProperty.unlink( valuePropertyListener ); - this.toggledEmitter.removeListener( toggleListener ); + this.toggledEmitter.dispose(); }; } diff --git a/js/buttons/ToggleButtonModel.js b/js/buttons/ToggleButtonModel.js index 0c914516..25d3e641 100644 --- a/js/buttons/ToggleButtonModel.js +++ b/js/buttons/ToggleButtonModel.js @@ -63,7 +63,7 @@ class ToggleButtonModel extends ButtonModel { // @private - dispose items specific to this instance this.disposeToggleButtonModel = () => { this.downProperty.unlink( downListener ); - this.toggledEmitter.removeListener( toggleListener ); + this.toggledEmitter.dispose(); }; }