stateMachineDemo.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>jsPlumb 1.3.7 - State Machine Demonstration - jQuery</title>
  5. <link rel="stylesheet" href="../css/jsPlumbDemo.css">
  6. <link rel="stylesheet" href="../css/stateMachineDemo.css">
  7. </head>
  8. <body onunload="jsPlumb.unload()" data-demo-id="stateMachineDemo" data-library="jquery">
  9. <div style="position:absolute">
  10. <div id="demo">
  11. <div class="w" id="opened">begin<div class="ep"></div></div>
  12. <div class="w" id="olga">phone interview 1<div class="ep"></div></div>
  13. <div class="w" id="nicola">phone interview 2<div class="ep"></div></div>
  14. <div class="w" id="inperson">in person<div class="ep"></div></div>
  15. <div class="w" id="rejected">rejected<div class="ep"></div></div>
  16. </div>
  17. </div>
  18. <div id="explanation">
  19. <p>This is a demonstration of the StateMachine connector type, and of 'Continuous' anchors, which are anchors whose location is calculated based
  20. on the location of all other connected elements.
  21. </p>
  22. <p>These behave in a similar way to 'Dynamic' anchors, which have been in jsPlumb for a while now,
  23. but Continuous anchors do not require a list of possible locations, and they guarantee that every Connection has its own anchor.
  24. </p>
  25. <p>Click and drag new Connections from the red div in each element; the main elements in the UI are configured to be Connection targets. You can
  26. drag from one of these divs onto its parent element to create a 'loopback' connection.</p>
  27. <p>Click on a Connection to delete it.</p>
  28. <p>makeSource is used in a special way in this demonstration: it is provided with a 'parent' parameter, which tells jsPlumb which element should
  29. be the eventual source of a newly created connection. So although you drag from the red divs, the connection sources are always configured to be the
  30. main divs in the UI.</p>
  31. <p>This demonstration uses jsPlumb 1.3.7, jQuery 1.7.1 and jQuery UI 1.8.13.</p>
  32. </div>
  33. <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script><script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js'></script>
  34. <script type='text/javascript' src='../js/jquery.jsPlumb-1.3.7-all-min.js'></script>
  35. <!-- demo code -->
  36. <script type="text/javascript" src="../js/stateMachineDemo.js"></script>
  37. <script type="text/javascript" src="../js/stateMachineDemo-jquery.js"></script>
  38. <script type="text/javascript" src="../js/demo-list.js"></script>
  39. <script type="text/javascript" src="../js/demo-helper-jquery.js"></script>
  40. </body>
  41. </html>