Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InteractiveHighlighting does not support DAG or multi-Displays #1619

Open
zepumph opened this issue Mar 13, 2024 · 0 comments
Open

InteractiveHighlighting does not support DAG or multi-Displays #1619

zepumph opened this issue Mar 13, 2024 · 0 comments

Comments

@zepumph
Copy link
Member

zepumph commented Mar 13, 2024

While working on #1615 with @jessegreenberg, we found a couple of scary problems with InteractiveHighlighting that most likely have not exposed themselves since PhET doesn't support DAG or multi-displays with its usages of InteractiveHighlighting nodes. I'll jot down a few problems for when we hit this in the future and need to support it.

  1. DAG: Each time we look through the list of display values, that is not a unique list, so we may encounter multiple Displays and do work to change the same display multiple times, for example on pointer enter:
    const newFocus = new Focus( display, event.trail );
    . This likely isn't buggy, but it is creating multiple instances of Focus and could lead to downstream issues.
  2. Multi-displays: _onInteractiveHighlightingEnabledChange will add the activation listener to the Node if ANY display's display.focusManager.pointerHighlightsVisibleProperty is true, but the activationListener does not see if the particular display in the list has that value set to true, so basically if any Display is pointer highlights visible, this Node will activate for all displays. Likely checking on that value in all listener event callbacks (move/enter/down/release/cancel/etc) is best, but we want to make sure we are complete in that, and base it on the trail.

I'm not planning to work on this any time soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant