Recently I started to learn Drag and Drop API and was going through some tutorial on Youtube starting with this which was pretty good, Understood the whole Drag Cycle
.
But I saw some other tutorials which were not using drag
but the drag feature was created using mouseup
, mousedown
, mousemove
events.
I am currently researching on Vanilla JS
I am still trying to find an answer to -
Why use
mouse
events overdrag
event? Is it that few things which can be done usingmouse
events cannot be done usingdrag
event?If that's the case what are the scenarios where using
drag
won't work? or usingmouse
event won't work?How to choose which way to implement
drag and drop
feature? any pros or cons in both methods?Any other way? (I mean other than
mouse
events anddrag
event)