diff --git a/js/imports.ts b/js/imports.ts index 942addc8a..2243881fc 100644 --- a/js/imports.ts +++ b/js/imports.ts @@ -423,5 +423,4 @@ export { default as Display } from './display/Display.js'; export type{ DisplayOptions } from './display/Display.js'; export { default as IndexedNodeIO } from './nodes/IndexedNodeIO.js'; -export type { IndexedNodeIOParent } from './nodes/IndexedNodeIO.js'; -export { default as PhetioControlledVisibilityProperty } from './util/PhetioControlledVisibilityProperty.js'; \ No newline at end of file +export type { IndexedNodeIOParent } from './nodes/IndexedNodeIO.js'; \ No newline at end of file diff --git a/js/util/PhetioControlledVisibilityProperty.js b/js/util/PhetioControlledVisibilityProperty.js deleted file mode 100644 index c8a168b91..000000000 --- a/js/util/PhetioControlledVisibilityProperty.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021-2024, University of Colorado Boulder - -/** - * An enhanced DerivedProperty to be used as a visibilityProperty to a Node when phet-io needs to be able to - * independently set visibility to false in a way that can't be overridden by the sim. - * - * @author Jonathan Olson - */ - -import BooleanProperty from '../../../axon/js/BooleanProperty.js'; -import DerivedProperty from '../../../axon/js/DerivedProperty.js'; -import merge from '../../../phet-core/js/merge.js'; -import Tandem from '../../../tandem/js/Tandem.js'; -import { scenery } from '../imports.js'; - -class PhetioControlledVisibilityProperty extends DerivedProperty { - /** - * @param {Array.|TinyProperty>} dependencies - Properties that this Property's value is derived from - * @param {(...x:any[])=>boolean} derivation - function that derives this Property's value, expects args in the same order as dependencies - * @param {Object} [options] - see Property - */ - constructor( dependencies, derivation, options ) { - - options = merge( { - nodeTandem: Tandem.REQUIRED - }, options ); - - // We'll create an instrumented BooleanProperty that, when toggled to false, will hide the node regardless of - // what the derivation would return. - const visibleProperty = new BooleanProperty( true, { - tandem: options.nodeTandem.createTandem( 'visibleProperty' ), - phetioFeatured: true - } ); - - super( [ visibleProperty, ...dependencies ], ( visible, ...args ) => visible && derivation( ...args ) ); - } -} - -scenery.register( 'PhetioControlledVisibilityProperty', PhetioControlledVisibilityProperty ); -export default PhetioControlledVisibilityProperty; \ No newline at end of file