Commit 35861d9c authored by delanoe's avatar delanoe

Merge branch 'master' of github.com:PkSM3/garg

parents 67c6a00c efea6a63
...@@ -29,8 +29,20 @@ var mainfile = ["db.json"]; ...@@ -29,8 +29,20 @@ var mainfile = ["db.json"];
// var corpusesList = {} // garg exclusive -> corpus comparison // var corpusesList = {} // garg exclusive -> corpus comparison
// getUrlParam.file = "data/testgraph.json"; // getUrlParam.file = "data/testgraph.json";
if($("#graphid").length>0) // just Garg
getUrlParam.file = window.location.origin+"/"+$("#graphid").html(); // just Garg
if( isUndef(getUrlParam.field1) && isUndef(getUrlParam.field2) ) {
if($("#graphid").length>0) {
getUrlParam.file = window.location.origin+"/"+$("#graphid").html(); // just Garg
}
} else {
var current_url = window.location.origin+window.location.pathname+window.location.search
getUrlParam.file = current_url.replace(/project(.*?)corpus/g, "api/corpus").replace("explorer?","graph?")
}
// if($("#graphid").length>0) // just Garg
// getUrlParam.file = window.location.origin+"/"+$("#graphid").html(); // just Garg
var corpusesList = {} var corpusesList = {}
var Clusters = []; var Clusters = [];
......
...@@ -516,7 +516,8 @@ function scanJSON( data ) { ...@@ -516,7 +516,8 @@ function scanJSON( data ) {
// Level-00 // Level-00
// for {1,2}partite graphs // for {1,2}partite graphs
function dictfyJSON( data , categories ) { function dictfyJSON( data , categories ) {
console.clear()
console.log("IN DICTIFY JSON")
var catDict = {} var catDict = {}
var catCount = {} var catCount = {}
for(var i in categories) catDict[categories[i]] = i; for(var i in categories) catDict[categories[i]] = i;
...@@ -572,7 +573,7 @@ function dictfyJSON( data , categories ) { ...@@ -572,7 +573,7 @@ function dictfyJSON( data , categories ) {
edge.weight = weight; edge.weight = weight;
edge.type = type; edge.type = type;
if (nodes[source] && nodes[target]) { if ( (nodes[source] && nodes[target]) ) {
idS=nodes[source].type; idS=nodes[source].type;
idT=nodes[target].type; idT=nodes[target].type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment