Closed dcousens closed 9 years ago
For onDrag
, I'm not sure if onPress
should be necesary before or after
Maybe onDrag
should be ignored, simply because of the hacks necessary for the behaviour to be consistent (onMouseMove
isn't as contextual as onTouchMove
, and therefore needs a top-level div
to catch the event)
I don't see any real value in onRelease, but it's just a simple event that doesn't really affect anything else so I don't mind it.
for onDrag
, I have some thoughts:
onDrag
should only fire after a press event has fired. This is useful for re-arranging items in a scrollable list for example.As a result, I think onDrag should be divided into two separate events: onDrag
and onPressDrag
.
onPressDrag
would only fire after a press event when dealing with touch. Both events would fire in the case of a mouse drag.
This PR needs a lot more work. Closing.
This pull request adds an
onRelease
event that is fired for bothonTouchEnd
andonMouseUp
.Edge cases are probably missing, but we'll figure it out as they come.