Mercurial > hg > Members > nobuyasu > Consensus
changeset 112:34aa9d3b81b6 draft
remove unnecessary code
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 18 Mar 2013 02:14:42 +0900 |
parents | 5ad0ba30c785 |
children | 790f37202698 |
files | public/viewer/viewer_white.html |
diffstat | 1 files changed, 0 insertions(+), 52 deletions(-) [+] |
line wrap: on
line diff
--- a/public/viewer/viewer_white.html Mon Mar 18 02:11:29 2013 +0900 +++ b/public/viewer/viewer_white.html Mon Mar 18 02:14:42 2013 +0900 @@ -295,7 +295,6 @@ }; -var edgeArray = new Array(); function Edge(fromNode, toNode, relation) { var obj = {from:fromNode, to:toNode, rel:relation }; return obj; @@ -318,27 +317,6 @@ endpoint:"Blank", }; -function paintEdge() { - var array = edgeArray; - for (var i=0; i<array.length; i++) { - connectGraph(array[i]); - } - jsPlumb.removeAllEndpoints(); - jsPlumb.draggable($('.graphNode')); - /* - jsPlumb.repaintEverything(); - */ -} - -function connectGraph(graphObj) { - var fromNode = graphObj.from; - var toNode = graphObj.to; - var rel = graphObj.rel; - var c = jsPlumb.connect({source:fromNode.view[0], target:toNode.view[0]}, arrowConnector); - c.setLabel({label:"<span style='color:black;'>"+rel+"</span>",cssStyle:"color:black"}); - return c; -} - function GraphData() { var graphData = {}; graphData.nodes = {}; @@ -373,31 +351,10 @@ return memory; } -function start() { - init(); - var rootNode = new Object(); - rootNode.property = sampleJSON1; - showMiniDisplay(rootNode); - updateNode(rootNode); - /* test code */ - var n1 = {property:{title:"task2"}}; - var n2 = {property:{title:"task3"}}; - 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(); -} - - function showEdge(graphData, edge) { function connectEdge(fromNode, toNode, rel, type) { var c; if (type == 'both') { - /* TODO */ c = jsPlumb.connect({source:fromNode.view[0], target:toNode.view[0]}, arrowBothConnector); } else { c = jsPlumb.connect({source:fromNode.view[0], target:toNode.view[0]}, arrowConnector); @@ -547,15 +504,6 @@ } } -/* sample data */ -sampleJSON1 = { - id:"5", - title:"task1", - kind:"agreed", - createdUser:"oshiro", - createdDate: new Date() -}; - sampleJSONData = { nodes: [ {