Skip to content

Commit

Permalink
opt out of linkedElement and rename checkbox Property to match conven…
Browse files Browse the repository at this point in the history
…tion, #654
  • Loading branch information
zepumph committed Aug 20, 2020
1 parent fde5308 commit e10aa8a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/ProjectorModeCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import ColorProfile from '../../scenery-phet/js/ColorProfile.js';
import Text from '../../scenery/js/nodes/Text.js';
import Checkbox from '../../sun/js/Checkbox.js';
import Tandem from '../../tandem/js/Tandem.js';
import joistStrings from './joistStrings.js';
import joist from './joist.js';
import joistStrings from './joistStrings.js';
import OptionsDialog from './OptionsDialog.js';

const projectorModeString = joistStrings.projectorMode;
Expand All @@ -37,7 +37,10 @@ class ProjectorModeCheckbox extends Checkbox {

font: OptionsDialog.DEFAULT_FONT,
maxTextWidth: 350, // empirically determined, works reasonably well for long strings
tandem: Tandem.REQUIRED
tandem: Tandem.REQUIRED,

// phet-io
phetioLinkProperty: false // we will create the `property` tandem here in the subtype
}, options );

// verify that colorProfile has the required profiles
Expand All @@ -54,7 +57,7 @@ class ProjectorModeCheckbox extends Checkbox {
// Internal adapter Property, to map between the string value needed by colorProfile.profileNameProperty
// and the boolean value needed by superclass Checkbox.
const projectorModeEnabledProperty = new BooleanProperty( colorProfile.profileNameProperty.value === ColorProfile.PROJECTOR_COLOR_PROFILE_NAME, {
tandem: options.tandem.createTandem( 'projectorModeEnabledProperty' )
tandem: options.tandem.createTandem( 'property' )
} );
projectorModeEnabledProperty.link( isProjectorMode => {
colorProfile.profileNameProperty.value =
Expand Down

0 comments on commit e10aa8a

Please sign in to comment.