Skip to content

Commit

Permalink
use isDisposable: false instead of overridden dispose methods, phet…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jul 10, 2023
1 parent 8907ded commit 1442abe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
11 changes: 2 additions & 9 deletions js/common/view/NLCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class NLCheckbox extends Checkbox {
textOptions: {
font: new PhetFont( 16 ),
maxWidth: 200
}
},
isDisposable: false
}, options );

const content = new Text( contentString, options.textOptions );
Expand All @@ -41,14 +42,6 @@ class NLCheckbox extends Checkbox {

this.touchArea = this.localBounds.dilated( TOUCH_AREA_DILATION );
}

/**
* @public
* @override
*/
dispose() {
assert && assert( false, 'NLCheckbox does not support dispose' );
}
}

numberLineCommon.register( 'NLCheckbox', NLCheckbox );
Expand Down
11 changes: 2 additions & 9 deletions js/common/view/NLCheckboxGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,12 @@ class NLCheckboxGroup extends VBox {
spacing: 12,
align: 'left',
left: NLCConstants.SCREEN_VIEW_X_MARGIN,
top: NLCConstants.SCREEN_VIEW_Y_MARGIN
top: NLCConstants.SCREEN_VIEW_Y_MARGIN,
isDisposable: false
}, options );

super( options );
}

/**
* @public
* @override
*/
dispose() {
assert && assert( false, 'NLCheckboxGroup does not support dispose' );
}
}

numberLineCommon.register( 'NLCheckboxGroup', NLCheckboxGroup );
Expand Down

0 comments on commit 1442abe

Please sign in to comment.