1
0
Fork 0

Added quick community check to NodeShaper also

This commit is contained in:
Michael Hackstein 2013-07-17 08:18:48 +02:00
parent 9e0873b922
commit f8ca0ef0f9
1 changed files with 3 additions and 4 deletions

View File

@ -80,7 +80,6 @@ function NodeShaper(parent, flags, idfunc) {
"use strict"; "use strict";
var self = this, var self = this,
communityRegEx = /^\*community/,
nodes = [], nodes = [],
visibleLabels = true, visibleLabels = true,
@ -202,10 +201,10 @@ function NodeShaper(parent, flags, idfunc) {
addQue = function (g) { addQue = function (g) {
var community = g.filter(function(n) { var community = g.filter(function(n) {
return communityRegEx.test(n._id); return n._isCommunity;
}), }),
normal = g.filter(function(n) { normal = g.filter(function(n) {
return !communityRegEx.test(n._id); return !n._isCommunity;
}); });
addCommunityShape(community); addCommunityShape(community);
addShape(normal); addShape(normal);
@ -249,7 +248,7 @@ function NodeShaper(parent, flags, idfunc) {
g.enter() g.enter()
.append("g") .append("g")
.attr("class", function(d) { .attr("class", function(d) {
if (communityRegEx.test(d._id)) { if (d._isCommunity) {
return "node communitynode"; return "node communitynode";
} }
return "node"; return "node";