Open guoliang opened 5 months ago
Hello, did you resolve this somehow? I also think that it'd be useful to be able to create a custom drag image.
Hello, did you resolve this somehow? I also think that it'd be useful to be able to create a custom drag image.
I haven't. I'm just using what's possible atm.
Is your feature request related to a problem? Please describe. It's not per say related, but I think if possible maybe it would resolve https://github.com/reppners/ngx-drag-drop/issues/110
Currently this library don't support creating a drag element on the fly I think?
Since when I looked in here https://github.com/reppners/ngx-drag-drop/blob/280b10c71c78aec812e76fe1a241d2035547f5aa/projects/dnd/src/lib/dnd-draggable.directive.ts#L238-L245
It seems it is either the dragged element, or the custom element annotated with
dndDragImageElementRef
used as the dragging element. According to https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setDragImage it should be possible to create an image element, and set it as the dragged element withsetDragImage
Describe the solution you'd like Possibility to supply parameters to have an image element created, wherein it is used as the dragged element.