1234567891011121314151617181920212223242526272829303132 |
- ;(function() {
-
- window.jsPlumbDemo = {
-
- init : function() {
- var fillColor = "gray";
- // notice the 'curviness' argument to this Bezier curve. the curves on this page are far smoother
- // than the curves on the first demo, which use the default curviness value.
- jsPlumb.Defaults.Connector = [ "Bezier", { curviness:50 } ];
- jsPlumb.Defaults.DragOptions = { cursor: "pointer", zIndex:2000 };
- jsPlumb.Defaults.PaintStyle = { strokeStyle:"gray", lineWidth:2 };
- jsPlumb.Defaults.EndpointStyle = { radius:9, fillStyle:"gray" };
- jsPlumb.Defaults.Anchors = [ "BottomCenter", "TopCenter" ];
-
- // declare some common values:
- var arrowCommon = { foldback:0.7, fillStyle:fillColor, width:14 };
- // use three-arg spec to create two different arrows with the common values:
- var overlays = [
- [ "Arrow", { location:0.7 }, arrowCommon ],
- [ "Arrow", { location:0.3, direction:-1 }, arrowCommon ]
- ];
-
- jsPlumb.connect({source:"window3", target:"window6", overlays:overlays});
- jsPlumb.connect({source:"window1", target:"window2", overlays:overlays});
- jsPlumb.connect({source:"window1", target:"window3", overlays:overlays});
- jsPlumb.connect({source:"window2", target:"window4", overlays:overlays});
- jsPlumb.connect({source:"window2", target:"window5", overlays:overlays});
- }
- };
-
- })();
|