# HG changeset patch # User Nobuyasu Oshiro # Date 1363448438 -32400 # Node ID 098e8725390355511a207fc9db62344285da8b9b # Parent 06e41956273436c8bac0ad27456ed570a1d349fe modfied jsPlumb diff -r 06e419562734 -r 098e87253903 public/viewer/viewer_white.html --- a/public/viewer/viewer_white.html Sat Mar 16 23:14:17 2013 +0900 +++ b/public/viewer/viewer_white.html Sun Mar 17 00:40:38 2013 +0900 @@ -30,17 +30,18 @@ font-size:40px; } div.graphNode { + position:absolute; + font-size:12px; padding:4px; background:white; z-index:20; - position:absolute; width:92px; height40px; font-size:12px; padding:4px; background:white; + width: 50px; + height 50px; + border-radius:50px; border:2px solid silver; overflow:hidden; - border-radius:5px; cursor:pointer; border-color:"blue"; - -
Home
@@ -62,7 +63,6 @@
-
@@ -248,7 +248,7 @@ offsetLeft:100, offsetRight:100, nodeWidth:120, - odeHeight:60, + nodeHeight:60, intervalX:140, intervalY:120 }; @@ -274,10 +274,40 @@ var n2 = {property:{title:"ttt"}}; updateNode(n1); updateNode(n2); + + var e1 = new Edge(rootNode, n1, "dependency"); + var e2 = new Edge(n1, n2, "dependency"); + edgeArray.push(e1); + edgeArray.push(e2); + paintEdge(); +/* var c = jsPlumb.connect({source:n1.view[0], target:n2.view[0]}); c.setLabel({label:""+"",cssStyle:"color:white"}); jsPlumb.repaintEverything(); jsPlumb.removeAllEndpoints(); +*/ +} + +var edgeArray = new Array(); +function Edge(fromNode, toNode, relation) { + var obj = {from:fromNode, to:toNode, rel:relation }; + return obj; +} + +function paintEdge() { + var array = edgeArray; + for (var i=0; i"+"",cssStyle:"color:white"}); + } + jsPlumb.removeAllEndpoints(); + jsPlumb.draggable($('.graphNode')); +/* + jsPlumb.repaintEverything(); +*/ } /* sample data */