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

Should all balloon listeners be added on the same Node? #461

Closed
zepumph opened this issue Nov 12, 2019 · 1 comment
Closed

Should all balloon listeners be added on the same Node? #461

zepumph opened this issue Nov 12, 2019 · 1 comment
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Nov 12, 2019

While working on phetsims/gravity-force-lab#189, we noticed that that bug in common code wasn't effecting the BalloonNode. The reason is that the GrabDragInteraction is being added to a sub "image" node, while the moveableDragHandler is added directly to the BalloonNode. @jessegreenberg can you explain this discrepancy? I'm not sure what the benefit is to have these on separate Nodes, but it seems more confusing.

@jessegreenberg
Copy link
Contributor

Coming back to this because I had to review listener code for #522. The GrabDragHandler modifies a child of the BalloonNode rather than BalloonNode directly because the BalloonNode itself has content for the PDOM that should contain the PDOM content related to the GrabDragInteraction. It accomplishes HTML that looks like

<div>
  <h3>Yellow Balloon</h3>
  <p>A description of the balloon's location, charges, velocity, etc...</p>
  <div>
    <button>Grab Yellow Balloon</button> // button related to GrabDragInteraction
    <p>Description specific to GrabDRagInteraction
  </div>
</div>

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

2 participants