mirror of https://gitee.com/bigwinds/arangodb
GraphViewer: CommunityNodes will now check if enough space is available and if there isn't expanded nodes will be colapsed again
This commit is contained in:
parent
cded8c87ed
commit
a5a661abca
|
@ -32,7 +32,9 @@
|
||||||
function CommunityNode(parent, initial) {
|
function CommunityNode(parent, initial) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
if (_.isUndefined(parent) || !_.isFunction(parent.dissolveCommunity)) {
|
if (_.isUndefined(parent)
|
||||||
|
|| !_.isFunction(parent.dissolveCommunity)
|
||||||
|
|| !_.isFunction(parent.checkNodeLimit)) {
|
||||||
throw "A parent element has to be given.";
|
throw "A parent element has to be given.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,6 +354,7 @@ function CommunityNode(parent, initial) {
|
||||||
colourFunc(inner);
|
colourFunc(inner);
|
||||||
inner.on("click", function() {
|
inner.on("click", function() {
|
||||||
self.expand();
|
self.expand();
|
||||||
|
parent.checkNodeLimit(self);
|
||||||
start();
|
start();
|
||||||
});
|
});
|
||||||
addCollapsedLabel(inner, colourMapper);
|
addCollapsedLabel(inner, colourMapper);
|
||||||
|
|
Loading…
Reference in New Issue