drag end event on Anchor

245 views
Skip to first unread message

Chris de G

unread,
Feb 25, 2012, 3:27:05 PM2/25/12
to jsPlumb
Is it possible to get an event fired when a div is dragged? This does
n't work.

mydiv.addEventListener ("dragend",function(e){
console.log('drag end');
}, false);

Simon Porritt

unread,
Feb 25, 2012, 3:34:15 PM2/25/12
to jsp...@googlegroups.com
are you talking about elements you've made draggable with
jsPlumb.draggable(..) ?

Oliver Kopp

unread,
Jun 20, 2013, 1:44:47 PM6/20/13
to jsp...@googlegroups.com
Hey,

Yes. At least, I do.

"dragstart" is fired, "dragstop" not. A workaround exists with a global variable and catchting "mouseup". However, this is not readable code :)

Peter Breitling

unread,
Jul 8, 2013, 4:20:28 PM7/8/13
to jsp...@googlegroups.com
Using jsPlump together with jquery using

$(mydiv).bind('dragstop', function()
            {
// your code
            });

works for me.
Reply all
Reply to author
Forward
0 new messages