Skip to content

Commit

Permalink
minor style improvements made while working on phetsims/mean-share-an…
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Jan 23, 2024
1 parent b17aec4 commit b82fce1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/accessibility/voicing/InteractiveHighlighting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ const InteractiveHighlighting = memoize( <SuperType extends Constructor<Node>>(
for ( let i = 0; i < displays.length; i++ ) {
const display = displays[ i ];

if ( display.focusManager.pointerFocusProperty.value === null || !event.trail.equals( display.focusManager.pointerFocusProperty.value.trail ) ) {
if ( display.focusManager.pointerFocusProperty.value === null ||
!event.trail.equals( display.focusManager.pointerFocusProperty.value.trail ) ) {

const newFocus = new Focus( display, event.trail );
display.focusManager.pointerFocusProperty.set( newFocus );
if ( display.focusManager.lockedPointerFocusProperty.value === null && event.pointer.attachedListener ) {
Expand Down Expand Up @@ -437,8 +439,10 @@ const InteractiveHighlighting = memoize( <SuperType extends Constructor<Node>>(
* Save the Pointer and add a listener to it to remove highlights when a pointer is released/cancelled.
*/
private savePointer( eventPointer: Pointer ): void {
assert && assert( this._pointer === null,
'It should be impossible to already have a Pointer before locking from touchSnag' );
assert && assert(
this._pointer === null,
'It should be impossible to already have a Pointer before locking from touchSnag'
);

this._pointer = eventPointer;
this._pointer.addInputListener( this._pointerListener );
Expand Down

0 comments on commit b82fce1

Please sign in to comment.