Skip to content

Commit

Permalink
support fromLinking in subtypes too (with test confirming the problem),
Browse files Browse the repository at this point in the history
phetsims/tandem#300

Signed-off-by: Michael Kauzmann <[email protected]>
  • Loading branch information
zepumph committed Jun 20, 2023
1 parent 9a1468f commit 575901a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/ReadOnlyProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,17 +627,17 @@ export default class ReadOnlyProperty<T> extends PhetioObject implements TReadOn
/**
* Support treating ourselves as an autoselectable entity for the "strings" selection mode.
*/
public override getPhetioMouseHitTarget(): PhetioObject | 'phetioNotSelectable' {
public override getPhetioMouseHitTarget( fromLinking = false ): PhetioObject | 'phetioNotSelectable' {

if ( phet.tandem.phetioElementSelectionProperty.value === 'string' ) {

// As of this writing, the only way to get to this function is for Properties that have a value of strings, but
// in the future that may not be the case. SR and MK still think it is preferable to keep this general, as false
// positives for autoselect are generally better than false negatives.
return this.getPhetioMouseHitTargetSelf();
return this.getPhetioMouseHitTargetSelf();
}

return super.getPhetioMouseHitTarget();
return super.getPhetioMouseHitTarget( fromLinking );
}


Expand Down

0 comments on commit 575901a

Please sign in to comment.