dart-dnd icon indicating copy to clipboard operation
dart-dnd copied to clipboard

Feature Request

Open Monotoba opened this issue 6 years ago • 4 comments

Let me say your lib is great and easy to use. However, it is lacking one feature (and so is the native dart) that would ease development for many. That one feature would be the offset between the mouse pointer (position) and the upper left corner of the element being dragged. This would help in setting the position for the element being dragged.

Monotoba avatar Feb 14 '18 18:02 Monotoba

Do you see a way to do this?

marcojakob avatar Feb 14 '18 19:02 marcojakob

The only way I see to do it is to get the mouse pointer offset in onDragStart and then make it available in onDrop. I'm using this https://stackoverflow.com/questions/33360151/moving-elements-by-dragging-in-dart at the moment but if it were part of your lib. it would make life easier for all.

Monotoba avatar Feb 14 '18 19:02 Monotoba

I think this would be a helpful feature to include. Would you mind implementing it? I would be happy to review and accept a pull request for it.

marcojakob avatar Feb 14 '18 19:02 marcojakob

I can try but I am new to Dart and Dart web development... I haven't even looked at your code yet and I an struggling with getting drag and drop to work. But I'll give it a try.

Monotoba avatar Feb 14 '18 19:02 Monotoba