javascript - how to register YUI drag event -


i've read http://yuilibrary.com/yui/docs/dd/, still have no clue how register drag event.

i'm using jsplumb.draggable make .w class divs draggable, , wanted call hander when element gets dragged.

is following coding valid?

                jsplumb.draggable(y.all(".w"));              y.all(".w").on('drag:drag', function() { alert('do here'); }); 

thanks,

i don't think can listen drag event using jsplumb.

yui has drag class 1 fires drag event. you'd create instance of class , enough make node draggable.

var dd = new y.dd.drag({   node: '#foo' }); dd.on('drag:drag', function () {   // }); 

but jsplumb creates hidden drag instance , keeps itself. there doesn't seem way retrieve drag instance. recommendation open issue in jsplumb's github asking way this.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo