ui: improved graph view layouting and bundling
* move top and bottom layout buckets closer to center buckets * split undefined bundles into users and usees * acknowledge zoom for graph view size in layouting * bundle all referencing nodes * fixed bundle node and bundle edge count
This commit is contained in:
@@ -287,6 +287,20 @@ void Node::forEachChildNode(std::function<void(Node*)> func) const
|
||||
);
|
||||
}
|
||||
|
||||
void Node::forEachChildNodeRecursive(std::function<void(Node*)> func) const
|
||||
{
|
||||
forEachEdgeOfType(Edge::EDGE_MEMBER,
|
||||
[func, this](Edge* e)
|
||||
{
|
||||
if (this != e->getTo())
|
||||
{
|
||||
func(e->getTo());
|
||||
e->getTo()->forEachChildNode(func);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
bool Node::hasReferences() const
|
||||
{
|
||||
if (getLocationIds().size() > 0)
|
||||
|
||||
@@ -80,6 +80,7 @@ public:
|
||||
void forEachEdge(std::function<void(Edge*)> func) const;
|
||||
void forEachEdgeOfType(Edge::EdgeTypeMask mask, std::function<void(Edge*)> func) const;
|
||||
void forEachChildNode(std::function<void(Node*)> func) const;
|
||||
void forEachChildNodeRecursive(std::function<void(Node*)> func) const;
|
||||
|
||||
bool hasReferences() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user