トップ要素を表示し、その要素を画面上の他の 6 つの要素に接続する jsplumb を使用した非常に単純なセットアップを作成しました。
コネクタ ラインをアニメーション化して、単に表示するのではなく、一番上の要素から成長するように見えるようにすることは可能かどうか疑問に思っています。
シンプルなレイアウトを作成するためにコピーしたコードを次に示します。
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"});
});
私が使用したCSSは次のとおりです。
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;
}
そして、私のhtmlの本文セクションの内容は次のようになります
<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>
コネクタを starterPoint から下の各ウィンドウ要素に「成長」させたいと思います。
私はjsplumbの使用に非常に慣れていないため、それに関する多くの情報を見つけることができないようです
ありがとう