-
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
create DragListener as a replacement for SimpleDragHandler #131
Comments
Looks like an accidental closing, @jbphet can you confirm? |
I'm using a hack in Bending Light to get around the SimpleDragHandler issues. @jonathanolson said it is OK for now but in the future DragListener could make things much nicer. // HACK ALERT. Changes the event's currentTarget. Why didn't we need to do this with the other nodes?
// Presumably because they were in similar coordinate frames?
// See Scenery #131 create drag listener
// See Scenery #218 multitouch
// There is a precedent for this hack in SimpleDragHandler.js
var c = event.currentTarget;
event.currentTarget = prismNode;
prismNode.movableDragHandler.forwardStartEvent( event );
event.currentTarget = c; |
@jessegreenberg is this DragListener at all relevant to BASE and issues dev:a11y#116 dev:a11y#108? |
No, this is not related @terracoda. phetsims/balloons-and-static-electricity#116 and phetsims/balloons-and-static-electricity#108 involve understanding how the screen reader intercepts DOM events. This issue and #218 involve handling Scenery events for various multitouch issues. |
@jessegreenberg thanks for the clarification. |
Please be aware of MovableDragHandler which may have some features we want in DragListener. |
Opened in 9/10/2013, this issue was created because a replacement is needed for SimpleDragHandler. 3+ years later, I'm creating yet-another subtype of SimpleDragHandler in Unit Rates. And there are now 82 occurrences of the Labeling for developer meeting to check in on the status and priority of this issue. |
SimpleDragHandler seems to be working OK to me, but I'm not sure what all of the problems with it are (aside from the workaround described above). Would be good to discuss. Though with 82+ occurrences, it seems unlikely we will be able to replace them all especially if there is an API change. |
A few problems:
|
I wouldn't imagine initial replacement, but would just have an improved input system that would handle our canceling and interaction problems from #218. Sims could be migrated at whatever schedule potentially. Thus is the cost of delaying this long. |
@ariel-phet suggested @jonathanolson could work on this after Proportion Playground. |
From #218 (comment):
|
There are also actual "cancel" Scenery events that happen when a touch gesture is interrupted (say the user adds another finger or two and it triggers an app switch). We mostly don't handle those specifically, and map both "up" and "cancel" to "endDrag", but DragListener should definitely support more of a "cancel" behavior. |
This is one of the top things on my list, and I'll be working on it over the next week or two. Removing developer meeting tag unless there is something else to discuss. |
For the core PressListener/DragListener/FireListener, I've done cleanup, design improvements and resolved almost all TODOs. A few remaining questions:
@jbphet, I believe it is ready to look into integrating this more into sun components. Can we discuss this sometime? |
How about during core hours on Monday, 3/5/2018? |
Sounds good, I'll be available. |
4/26/18 dev meeting, noted while discussing phetsims/capacitor-lab-basics#214. DragListener is ready for general use, will make fixes and improvements as needed. Re remaining questions in #131 (comment)... • |
I'll move to dragBoundsProperty only, and will investigate attach:true on SimpleDragHandler. |
@jonathanolson in a slack thread when queried about the usage of DragListener you said
I am going to start using DragListener in energy-skate-park. |
@jonathanolson and I just reviewed the button code in sun, and the |
… add the listener to multiple nodes, see #131
I've handled all of the review items that were mentioned (or promoted others to issues). @ariel-phet , should this have more code review done, or can this be closed? |
No description provided.
The text was updated successfully, but these errors were encountered: