makeSourceDemo.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <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/makeSourceDemo.js"></script>
  37. <!-- demo helper code -->
  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>