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:
@@ -126,7 +126,9 @@ void QtGraphView::resizeView()
|
||||
Vec2i QtGraphView::getViewSize() const
|
||||
{
|
||||
QGraphicsView* view = getView();
|
||||
return Vec2i(view->width(), view->height());
|
||||
|
||||
float zoomFactor = GraphViewStyle::getZoomFactor();
|
||||
return Vec2i(view->width() / zoomFactor - 80, view->height() / zoomFactor - 80);
|
||||
}
|
||||
|
||||
void QtGraphView::centerScrollBars()
|
||||
@@ -337,7 +339,7 @@ std::shared_ptr<QtGraphNode> QtGraphView::createNodeRecursive(
|
||||
}
|
||||
else if (node.isBundleNode())
|
||||
{
|
||||
newNode = std::make_shared<QtGraphNodeBundle>(node.tokenId, node.bundledNodes.size(), node.name);
|
||||
newNode = std::make_shared<QtGraphNodeBundle>(node.tokenId, node.getBundledNodeCount(), node.name);
|
||||
}
|
||||
|
||||
newNode->setPosition(node.position);
|
||||
|
||||
Reference in New Issue
Block a user