Commit 8f01d002 authored by PkSM3's avatar PkSM3

remove clusters from InfoPanel and ChangeToMeso|Macro

parent d7dde326
......@@ -192,7 +192,14 @@ function getTopPapers(type){
var pub = arraydata[i]
var gquery = "http://www.google.com/#q="+pub["title"].replace(" "+"+")
var getpubAPI = window.location.origin+"/nodeinfo/"+pub["id"]
output += "<li><a href='Javascript:newPopup(\""+getpubAPI+"\")' target=_blank>"+pub["title"]+"</a>. Published in <a>"+pub["journal"]+"</a>, "+pub["publication_date"].split(" ")[0]+"\n";
var ifjournal="",ifauthors="",ifkeywords="",ifdate="",iftitle="";
if(pub["journal"]) ifjournal = "<br>Published in <a>"+pub["journal"]+"</a>";
if(pub["authors"]) ifauthors = "By "+pub["authors"]+"";
if(pub["fields"]) ifkeywords = "<br>Fields: "+pub["fields"];
if(pub["publication_date"]) ifdate = "<br>In "+pub["publication_date"].split(" ")[0];
output += "<li><a href='Javascript:newPopup(\""+getpubAPI+"\")' target=_blank>"+pub["title"]+"</a>. "+ifauthors+". "+ifjournal+". "+ifkeywords+". "+ifdate+"\n";
output += '<a href="'+gquery+'" target=_blank><img title="Query to Google" src="'+window.location.origin+'/static/img/google.png"></img></a>'
output +="</li>\n";
// for(var j in pub) {
......
......@@ -343,7 +343,7 @@ function htmlfied_alternodes(elems) {
(frec-1)*
((desirableTagCloudFont_MAX-desirableTagCloudFont_MIN)/(frecMAX-1));
}
if(!isUndef(Nodes[id])){
if(!isUndef(Nodes[id]) && !Nodes[id].iscluster ){
// js1 js2
// onclick="graphNGrams(' ');
htmlfied_alternode = '<span class="tagcloud-item" style="font-size:'+fontSize+'px;" '+js1+id+js2+'>'+ Nodes[id].label+ '</span>';
......@@ -368,7 +368,7 @@ function htmlfied_samenodes(elems) {
var A = getVisibleNodes()
for (var a in A){
n = A[a]
if(!n.active && n.color.charAt(0)=="#" ) {
if(!n.active && n.color.charAt(0)=="#" && !n.iscluster) {
sameNodes.push('<li onmouseover="manualForceLabel(\''+n.id+'\',true)" onmouseout="manualForceLabel(\''+n.id+'\',false)" >'+ n.label+ '</li>')
}
}
......@@ -389,34 +389,36 @@ function htmlfied_nodesatts(elems){
var id=elems[i]
var node = Nodes[id]
if (mainfile) {
information += '<li><b>' + node.label + '</b></li>';
for (var i in node.attributes) {
information += '<li>&nbsp;&nbsp;'+i +" : " + node.attributes[i] + '</li>';
}
socnodes.push(information);
} else {
if(node.type==catSoc){
information += '<li><b>' + node.label + '</b></li>';
if(node.htmlCont==""){
if (!isUndef(node.level)) {
information += '<li>' + node.level + '</li>';
}
} else {
information += '<li>' + $("<div/>").html(node.htmlCont).text() + '</li>';
}
socnodes.push(information)
}
if(node.type==catSem){
information += '<li><b>' + node.label + '</b></li>';
google='<a href=http://www.google.com/#hl=en&source=hp&q=%20'+node.label.replace(" ","+")+'%20><img src="'+'img/google.png"></img></a>';
wiki = '<a href=http://en.wikipedia.org/wiki/'+node.label.replace(" ","_")+'><img src="'+'img/wikipedia.png"></img></a>';
flickr= '<a href=http://www.flickr.com/search/?w=all&q='+node.label.replace(" ","+")+'><img src="'+'img/flickr.png"></img></a>';
information += '<li>'+google+"&nbsp;"+wiki+"&nbsp;"+flickr+'</li><br>';
semnodes.push(information)
}
}
if(!node.iscluster) {
if (mainfile) {
information += '<li><b>' + node.label + '</b></li>';
for (var i in node.attributes) {
information += '<li>&nbsp;&nbsp;'+i +" : " + node.attributes[i] + '</li>';
}
socnodes.push(information);
} else {
if(node.type==catSoc){
information += '<li><b>' + node.label + '</b></li>';
if(node.htmlCont==""){
if (!isUndef(node.level)) {
information += '<li>' + node.level + '</li>';
}
} else {
information += '<li>' + $("<div/>").html(node.htmlCont).text() + '</li>';
}
socnodes.push(information)
}
if(node.type==catSem){
information += '<li><b>' + node.label + '</b></li>';
google='<a href=http://www.google.com/#hl=en&source=hp&q=%20'+node.label.replace(" ","+")+'%20><img src="'+'img/google.png"></img></a>';
wiki = '<a href=http://en.wikipedia.org/wiki/'+node.label.replace(" ","_")+'><img src="'+'img/wikipedia.png"></img></a>';
flickr= '<a href=http://www.flickr.com/search/?w=all&q='+node.label.replace(" ","+")+'><img src="'+'img/flickr.png"></img></a>';
information += '<li>'+google+"&nbsp;"+wiki+"&nbsp;"+flickr+'</li><br>';
semnodes.push(information)
}
}
}
}
return socnodes.concat(semnodes)
}
......@@ -1408,6 +1410,7 @@ function unHide(id){
x: Nodes[id].x,
y: Nodes[id].y,
hidden: (Nodes[id].lock)?true:false,
iscluster: (Nodes[id].iscluster)?true:false,
type: Nodes[id].type,
color: Nodes[id].color,
shape: Nodes[id].shape
......@@ -1791,8 +1794,9 @@ function changeToMacro(iwannagraph) {
MultipleSelection(Object.keys(chosenones) , false)//false-> dont apply deselection algorithm
});
//iwantograph socio-semantic
} else {
//iwantograph socio-semantic
for(var n in Nodes) unHide(n);
for(var e in Edges) {
......
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