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 whitespace elimination is not disabled per default. #1054

Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -159,6 +159,7 @@ group whiteSpaceElimination {
description
"Strategy for expanding nodes such that whitespace in the parent is eliminated."
targets parents
default = WhiteSpaceEliminationStrategy.NONE
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,23 @@
*
*/
public enum WhiteSpaceEliminationStrategy implements ILayoutPhaseFactory<RectPackingLayoutPhases, ElkNode> {
/**
* The packing that is divided into rows, stacks, blocks, and subrows equally divides available space between this
* structures by moving the structures and the rectangles before expanding the rectangles such that all gaps are
* filled.
* The size of the parent remains unchanged.
*/
EQUAL_BETWEEN_STRUCTURES,
TO_ASPECT_RATIO;
/**
* Same as the equal between structures but the strategy expands to the desired aspect ratio.
* Hence, this increases the size of the parent.
*/
TO_ASPECT_RATIO,
/**
* Explicitly set that no whitespace elimination is done.
* This can be done explicitly, since some language do not support the use of null.
*/
NONE;

/* (non-Javadoc)
* @see org.eclipse.elk.core.alg.ILayoutPhaseFactory#create()
Expand All @@ -32,6 +47,7 @@ public ILayoutPhase<RectPackingLayoutPhases, ElkNode> create() {
return new EqualWhitespaceEliminator();
case TO_ASPECT_RATIO:
return new ToAspectratioNodeExpander();
case NONE:
default:
return null;
}
Expand Down