README.md

sigma.plugins.dragNodes

Plugin developed by José M. Camacho, events by Sébastien Heymann for Linkurious.


This plugin provides a method to drag & drop nodes. At the moment, this plugin is not compatible with the WebGL renderer. Check the sigma.plugins.dragNodes function doc or the example code to know more.

To use, include all .js files under this folder. Then initialize it as follows:

var dragListener = new sigma.plugins.dragNodes(sigInst, renderer);

Kill the plugin as follows:

sigma.plugins.killDragNodes(sigInst);

Events

This plugin provides the following events fired by the instance of the plugin:

  • startdrag: fired at the beginning of the drag
  • drag: fired while the node is dragged
  • drop: fired at the end of the drag if the node has been dragged
  • dragend: fired at the end of the drag

Exemple of event binding:

dragListener.bind('startdrag', function(event) {
  console.log(event);
});