-
Notifications
You must be signed in to change notification settings - Fork 12
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
Combine DragListener and KeyboardDragListener into a single class #1614
Comments
I also thought there was a similar issue, but can't locate it. It's unfortunate that we need to add both a DragListener and a KeyboardDragListener, but I'll be surprised if we find a way around that. |
This is probably a subset of #1238.
Great idea! |
I also was teasing with the idea of doing it in a different way, where we make KeyboardDragListener a subtype of DragListener. Perhaps calling it |
Over in phetsims/scenery-phet#849, we need KeyboardDragListener to have an |
Signed-off-by: Michael Kauzmann <michael.kauzmann@colorado.edu>
This was also nice, as it aligned the API for the |
Signed-off-by: Michael Kauzmann <michael.kauzmann@colorado.edu>
Signed-off-by: Michael Kauzmann <michael.kauzmann@colorado.edu>
I am trying out an idea for this in branch |
…and phetsims/scenery#1614" This reverts commit 0e8b2af.
…tation for how the listener works, see phetsims/scenery#1614
A combined RichDragListener was added to scenery-phet using the approach from #1614 (comment). It is in scenery-phet because it combines the "rich" drag listeners that also include tambo sounds. Ill prune the scenery branch now that we are done with it and transfer this issue to scenery-phet to wrap up. |
Code review will occur in phetsims/scenery-phet#858, closing. |
While working on phetsims/scenery-phet#849, we found that RichDragListener and RichKeyboardListener are identical, but need to be duplicated because they DragListener and KeyboardDragListener are separate classes. I wonder if we could create a third class that combines them into a single drag listener, and have RichDragListener extend from that. @jessegreenberg @pixelzoom, I couldn't find another issue for this, but please close as a duplicate if I missed it. I know we have discussed this before.
The text was updated successfully, but these errors were encountered: