mirror of https://gitee.com/bigwinds/arangodb
Added quick community check to NodeShaper also
This commit is contained in:
parent
9e0873b922
commit
f8ca0ef0f9
|
@ -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";
|
||||||
|
|
Loading…
Reference in New Issue