makeSourceDemo.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>jsPlumb 1.3.7 - connection targets demonstration</title>
  5. <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  6. <link rel="stylesheet" href="/mp.css">
  7. <link rel="stylesheet" href="../css/jsPlumbDemo.css">
  8. <link rel="stylesheet" href="../css/makeTargetDemo.css">
  9. </head>
  10. <body data-demo-id="makeSourceDemo" data-library="jquery">
  11. <div class="menu"><a href="../../doc/1.3.7/usage.html" class="mplink">view documentation</a>&nbsp;|&nbsp;<a href="../../apidocs">view api docs</a>&nbsp;|&nbsp;<a href="mailto:simon.porritt@gmail.com" class="mplink">contact me</a>&nbsp;|&nbsp;<a href="http://code.google.com/p/jsplumb/" class="mplink">jsPlumb on Google code</a></div>
  12. <div id="window1" class="window">
  13. This entire div is a connection target. When you drop a connection on this
  14. div, a new Endpoint is created and the connection is attached to it. The new
  15. Endpoint has a dynamic anchor with several possible locations.
  16. </div>
  17. <div id="window2" class="window">
  18. This entire div is a connection source. It is not draggable, but you can drag a connection from it; when the connection is established a new source endpoint is assigned, located at the bottom center of this element.
  19. </div>
  20. <div id="window3" class="window">
  21. This div is a connection target. When you drop a connection on it, a new Endpoint is created and the connection is attached to it. The new Endpoint is located exactly where on the div you let go of the mouse button.
  22. </div>
  23. <div id="window4" class="window">
  24. This entire div is a connection target. When you drop a connection on this
  25. div, a new Endpoint is created and the connection is attached to it. The new
  26. Endpoint is snapped to a 2x3 grid.
  27. </div>
  28. <div id="window5" class="window">
  29. The blue square in this div is a connection source. You can drag connections from it. When a connection is
  30. established, the Endpoint is moved to the main div, using a dynamic anchor that has a position at each corner.
  31. <div id="w5Source"></div>
  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. <!-- SVG renderer -->
  45. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-renderers-svg-1.3.7-RC1.js"></script>
  46. <!-- canvas renderer -->
  47. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-renderers-canvas-1.3.7-RC1.js"></script>
  48. <!-- vml renderer -->
  49. <script type="text/javascript" src="../../js/1.3.7/jsPlumb-renderers-vml-1.3.7-RC1.js"></script>
  50. <!-- jquery jsPlumb adapter -->
  51. <script type="text/javascript" src="../../js/1.3.7/jquery.jsPlumb-1.3.7-RC1.js"></script>
  52. <!-- /JS -->
  53. <!-- demo code -->
  54. <script type="text/javascript" src="../js/makeSourceDemo.js"></script>
  55. <!-- demo helper code -->
  56. <script type="text/javascript" src="../js/demo-list.js"></script>
  57. <script type="text/javascript" src="../js/demo-helper-jquery.js"></script>
  58. </body>
  59. </html>