Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an incorrect calculation of how to shift a mrtree layout. #1060

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@ public int compare(final TGraph graph1, final TGraph graph2) {
* @param g the graph to work on
*/
private void applyPaddingAndNormalizePositions(final TGraph g) {
ElkPadding padding = g.getNodes().get(0).getProperty(MrTreeOptions.PADDING);
ElkPadding padding = g.getProperty(MrTreeOptions.PADDING);
g.setProperty(InternalProperties.BB_UPLEFT, new KVector(0, 0));
moveGraph(new TGraph(), g, padding.getHorizontal() - g.getProperty(InternalProperties.GRAPH_XMIN),
padding.getVertical() - g.getProperty(InternalProperties.GRAPH_YMIN));
moveGraph(new TGraph(), g, padding.getLeft() - g.getProperty(InternalProperties.GRAPH_XMIN),
padding.getTop() - g.getProperty(InternalProperties.GRAPH_YMIN));
}


Expand Down