phetsims / friction

"Friction" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/friction
GNU General Public License v3.0
4 stars 6 forks source link

Add voicing to MagnifiedNode interaction #206

Closed zepumph closed 3 years ago

zepumph commented 3 years ago

There is a bit of an issue here, because we have two Nodes that get a FrictionDragListener, but only one of those gets the FrictionGrabDragInteraction. I want most of the voicing strings to come from the GrabDragInteraction, but there is overlap when I try to use the DragListener. Instead of doing things how they are currently implemented (via the startDrag in FrictionDragListener), I should go through the GrabDragInteraction, but then I am unsure about how to support voicing from the draggable backgroundNode which doesn't go through that channel. The easiest from a voicing perspective is to just have it be a child of the dragArea, but I'm unsure that that will work.

zepumph commented 3 years ago

Above I moved the background to be a child of the dragArea. I don't know why I didn't try to do this before! It was so easy. Now we can use the grabDragInteraction to facilitate all voicing for mouse and keyboard interaction.