Closed n1crack closed 2 years ago
how can I use custom image when dragging like :
el.addEventListener('dragstart', function (e) { const img = image_element; e.dataTransfer.setDragImage(img, 0, 15); e.dataTransfer.effectAllowed = 'all'; e.dataTransfer.dropEffect = 'copy'; e.dataTransfer.setData('data', 'test'); });
the events provided are returning MouseEvent, not DragEvent
I got it done somehow.
how can I use custom image when dragging like :
the events provided are returning MouseEvent, not DragEvent