stateMachineDemo-jquery.js 514 B

12345678910111213141516171819202122232425
  1. ;(function() {
  2. jsPlumbDemo.initEndpoints = function(nextColour) {
  3. $(".ep").each(function(i,e) {
  4. var p = $(e).parent();
  5. jsPlumb.makeSource($(e), {
  6. parent:p,
  7. endpoint:{
  8. anchor:"Continuous",
  9. connector:[ "StateMachine", { curviness:20 } ],
  10. connectorStyle:{ strokeStyle:nextColour(),lineWidth:2 },
  11. maxConnections:-1
  12. }
  13. });
  14. });
  15. jsPlumb.makeTarget($(".w"), {
  16. dropOptions:{ hoverClass:"dragHover" },
  17. endpoint:{
  18. anchor:"Continuous"
  19. }
  20. });
  21. };
  22. })();