I have created a very simple set up with jsplumb that displays a top element and then connects that element to six others on the screen.
I am wondering if it is possible to animate the connector lines so that they appear to grow from the top element rather than just appearing.
Here is the code that I have copied to create the simple layout.
jsPlumb.ready(function() {
jsPlumb.importDefaults({
// 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.
Connector : [ "Bezier", { curviness:50 } ],
PaintStyle : { strokeStyle:"#000000", lineWidth:6 },
EndpointStyle : { radius:1, fillStyle:"#000000" },
HoverPaintStyle : {strokeStyle:"#ec9f2e" },
EndpointHoverStyle : {fillStyle:"#ec9f2e" },
Anchors : [ "BottomCenter", "TopCenter" ]
});
jsPlumb.connect({source:"starterPoint", target:"window1"});
jsPlumb.connect({source:"starterPoint", target:"window2"});
jsPlumb.connect({source:"starterPoint", target:"window3"});
jsPlumb.connect({source:"starterPoint", target:"window4"});
jsPlumb.connect({source:"starterPoint", target:"window5"});
jsPlumb.connect({source:"starterPoint", target:"window6"});
});
The CSS I have used is as follows:
body
{
width: 960px;
margin: 0 auto;
}
#starterPoint
{
width: 8px;
height: 8px;
margin: 0 auto;
background-color:#000;
}
#window1, #window2, #window3, #window4, #window5, #window6
{
width: 100px;
height: 50px;
float: left;
margin-left: 50px;
margin-top: 70px;
background-color:#036;
}
And the content of the body section of my html looks like this
<div id="starterPoint"> </div>
<div id="window1"> </div>
<div id="window2"> </div>
<div id="window3"> </div>
<div id="window4"> </div>
<div id="window5"> </div>
<div id="window6"> </div>
I would like the connectors to "grow" from starterPoint to each of the window elements below.
I'm VERY new to using jsplumb and I can't seem to find a lot of information out there about it
Thanks