Graph database Analysis of the Steam Network
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

  1. sigma.plugins.dragNodes
  2. =====================
  3. Plugin developed by [José M. Camacho](https://github.com/josemazo), events by [Sébastien Heymann](https://github.com/sheymann) for [Linkurious](https://github.com/Linkurious).
  4. ---
  5. 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](../../examples/drag-nodes.html) to know more.
  6. To use, include all .js files under this folder. Then initialize it as follows:
  7. ````javascript
  8. var dragListener = new sigma.plugins.dragNodes(sigInst, renderer);
  9. ````
  10. Kill the plugin as follows:
  11. ````javascript
  12. sigma.plugins.killDragNodes(sigInst);
  13. ````
  14. ## Events
  15. This plugin provides the following events fired by the instance of the plugin:
  16. * `startdrag`: fired at the beginning of the drag
  17. * `drag`: fired while the node is dragged
  18. * `drop`: fired at the end of the drag if the node has been dragged
  19. * `dragend`: fired at the end of the drag
  20. Exemple of event binding:
  21. ````javascript
  22. dragListener.bind('startdrag', function(event) {
  23. console.log(event);
  24. });
  25. ````