1
0
Fork 0

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:
Michael Hackstein 2013-07-23 08:04:48 +02:00
parent cded8c87ed
commit a5a661abca
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,9 @@
function CommunityNode(parent, initial) {
"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.";
}
@ -352,6 +354,7 @@ function CommunityNode(parent, initial) {
colourFunc(inner);
inner.on("click", function() {
self.expand();
parent.checkNodeLimit(self);
start();
});
addCollapsedLabel(inner, colourMapper);