Drag & drop#492
Conversation
|
Will take a proper look but:
Just wanted to say that this seems like a very sensible choice. I'm anticipating that we'll probably get a new Winit beta once the DnD PR lands. |
|
No need to rush, I've only tested the incoming dnd events and not everything is implemented yet, but it's a great start. |
nicoburns
left a comment
There was a problem hiding this comment.
I took a look because I was curious and have a left a couple of notes.
And a general comment that:
Drag and Drop actually has three distinct use cases: dragging elements within a page, dragging data out of a page, and dragging data into a page. They have subtly different requirements and implementations.
(https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API)
And this only currently only implements "dragging data into a page". We don't necessarily need an implementation of all 3 at once, but it's at least worth thinking about when designing the API (and I'd personally be kinda tempted to try to handle "dragging elements within a page" too, as I think that might end up changing the design somewhat).
|
I think that the enter/over/leave/drop are now handled correctly (needs #496 to be fixed for bubbling) I think that the structure can support "dragging elements within a page" but I haven't come to that part yet, also dragable=true needs to handle the event data automagically so yea fun stuff |
drag enter/over/leave/drop
This is blocked on most likely next winit release as it's using the new dnd api