Mercurial > hg > Members > nobuyasu > html > graphViewer
changeset 52:5653ab0091be draft
implemented show information of metrics on miniDisplay.
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 24 Mar 2013 20:25:01 +0900 |
parents | 45daac436fd7 |
children | f35d7cada438 |
files | show.html |
diffstat | 1 files changed, 25 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/show.html Sun Mar 24 18:30:24 2013 +0900 +++ b/show.html Sun Mar 24 20:25:01 2013 +0900 @@ -181,13 +181,36 @@ } } +var NotDisplayProperty = { + id : 1, + edgeInfo : 1, + coordX : 1, + coordY : 1, + metrics : 1 +}; +function getMetricsStr(metricsArray) { + var str = ""; + str = "Metrics :<br>"; + for (var i=0; i<metricsArray.length; i++) { + var metrics = metricsArray[i]; + for (var key in metrics) { + str = str + key + " : " + metrics[key] +"<br>"; + } + } + return str; +} + function writeJSONDataToMiniDisplay(jsonObj) { var str = ""; for (var key in jsonObj.property) { - if (key != 'edgeInfo' ) { - str = str + key + ": "+ jsonObj.property[key] + "<br>"; + if (!NotDisplayProperty[key]) { + str = str + key + ": "+ jsonObj.property[key] + "<br>"; } } + if (jsonObj.property['metrics']) { + str = str + getMetricsStr(jsonObj.property.metrics); + } + writeMiniDisplay(jsonObj.property.title, str); }