stateMachineDemo.html 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. <!-- DEP -->
  34. <script type="text/javascript" src="../../js/lib/jquery-1.7.1-min.js"></script>
  35. <script type="text/javascript" src="../../js/lib/jquery-ui-1.8.13-min.js"></script>
  36. <!-- /DEP -->
  37. <!-- JS -->
  38. <!-- support lib for bezier stuff -->
  39. <script type="text/javascript" src="../../js/lib/jsBezier-0.3-min.js"></script>
  40. <!-- main jsplumb engine -->
  41. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-1.3.7-RC1.js"></script>
  42. <!-- connectors, endpoint and overlays -->
  43. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-defaults-1.3.7-RC1.js"></script>
  44. <!-- state machine connectors -->
  45. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-connectors-statemachine-1.3.7-RC1.js"></script>
  46. <!-- SVG renderer -->
  47. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-renderers-svg-1.3.7-RC1.js"></script>
  48. <!-- canvas renderer -->
  49. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-renderers-canvas-1.3.7-RC1.js"></script>
  50. <!-- vml renderer -->
  51. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-renderers-vml-1.3.7-RC1.js"></script>
  52. <!-- jquery jsPlumb adapter -->
  53. <script type="text/javascript" src="../../js/1.3.7/jquery.jsPlumb-1.3.7-RC1.js"></script>
  54. <!-- /JS -->
  55. <!-- demo code -->
  56. <script type="text/javascript" src="../js/stateMachineDemo.js"></script>
  57. <script type="text/javascript" src="../js/stateMachineDemo-jquery.js"></script>
  58. <script type="text/javascript" src="../js/demo-list.js"></script>
  59. <script type="text/javascript" src="../js/demo-helper-jquery.js"></script>
  60. </body>
  61. </html>