Mercurial > hg > Members > nobuyasu > html > graphViewer
changeset 5:db93a718f393 draft
modified traverseTemplate
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 20 Mar 2013 04:54:45 +0900 |
parents | 810e406abb71 |
children | a4323051f7af |
files | index.html |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/index.html Wed Mar 20 04:45:44 2013 +0900 +++ b/index.html Wed Mar 20 04:54:45 2013 +0900 @@ -163,7 +163,7 @@ } function createTraverseView(info) { - var view = {}; + var viewHtml = ""; for (var kind in info) { var data = info[kind]; var inNum = 0; @@ -174,15 +174,14 @@ if (data['out']) { outNum = data['out']; } - - + viewHtml = viewHtml + getTraverseDivTemplate(kind, inNum, outNum); } - + return viewHtml; } function writeEdgeInfoTraverseDisplay(node) { var id = node.property.id; - var edgeInfo = node.edgeInfo; + var edgeInfo = node.property.edgeInfo; var str = ""; var info = {}; for (var i=0; i<edgeInfo.length; i++) { @@ -191,7 +190,9 @@ var num = edgeInfo[i].num; info[kind][dir] = num; } - node.edgeInfo.view = createTraverseView(info); + var viewHTML = createTraverseView(info); + edgeInfo.viewHtml = viewHTML; + $('#traverseDisplayBody')[0].innerHTML = viewHTML; } function createTraverseDisplayInfo(info) { @@ -227,8 +228,8 @@ } function showTraverseDisplay(node) { - if (!node.edgeInfo) { console.log("not found node.edgeInfo "); return; } - if (!node.traverse) { + if (!node.property.edgeInfo) { console.log("not found node.edgeInfo "); return; } + if (!node.property.edgeInfo.viewHtml) { writeEdgeInfoTraverseDisplay(node); } $("#traverseDisplay").css("visibility", "visible");