mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 02:49:06 +00:00
Fixed printing togethers in nested groups
This commit is contained in:
parent
719927895b
commit
5096c1b9a4
@ -495,7 +495,7 @@ public class Cluster implements Moveable {
|
||||
|
||||
for (Cluster child : children)
|
||||
if (child.group.getTogether() == together)
|
||||
child.printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type, together);
|
||||
child.printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type);
|
||||
|
||||
for (Together otherTogether : otherTogethers)
|
||||
if (otherTogether.getParent() == together)
|
||||
@ -507,7 +507,7 @@ public class Cluster implements Moveable {
|
||||
}
|
||||
|
||||
public SvekNode printCluster2(StringBuilder sb, Collection<SvekLine> lines, StringBounder stringBounder,
|
||||
DotMode dotMode, GraphvizVersion graphvizVersion, UmlDiagramType type, Together parentTogether) {
|
||||
DotMode dotMode, GraphvizVersion graphvizVersion, UmlDiagramType type) {
|
||||
|
||||
SvekNode added = null;
|
||||
final Collection<Together> togethers = new LinkedHashSet<>();
|
||||
@ -526,7 +526,7 @@ public class Cluster implements Moveable {
|
||||
addTogetherWithParents(togethers, child.group.getTogether());
|
||||
|
||||
for (Together together : togethers)
|
||||
if (together.getParent() == parentTogether)
|
||||
if (together.getParent() == null)
|
||||
printTogether(together, togethers, sb, nodesOrderedWithoutTop, stringBounder, lines, dotMode, graphvizVersion, type);
|
||||
|
||||
if (skinParam.useRankSame() && dotMode != DotMode.NO_LEFT_RIGHT_AND_XLABEL
|
||||
@ -535,7 +535,7 @@ public class Cluster implements Moveable {
|
||||
|
||||
for (Cluster child : children)
|
||||
if (child.group.getTogether() == null)
|
||||
child.printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type, parentTogether);
|
||||
child.printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type);
|
||||
|
||||
return added;
|
||||
}
|
||||
@ -561,12 +561,12 @@ public class Cluster implements Moveable {
|
||||
}
|
||||
|
||||
for (Cluster child : getChildren())
|
||||
child.printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type, null);
|
||||
child.printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type);
|
||||
}
|
||||
|
||||
private void printInternal(StringBuilder sb, Collection<SvekLine> lines, StringBounder stringBounder,
|
||||
DotMode dotMode, GraphvizVersion graphvizVersion, UmlDiagramType type, Together parentTogether) {
|
||||
new ClusterDotString(this, skinParam).printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type, parentTogether);
|
||||
DotMode dotMode, GraphvizVersion graphvizVersion, UmlDiagramType type) {
|
||||
new ClusterDotString(this, skinParam).printInternal(sb, lines, stringBounder, dotMode, graphvizVersion, type);
|
||||
}
|
||||
|
||||
private void appendRankSame(StringBuilder sb, Collection<SvekLine> lines) {
|
||||
|
@ -46,7 +46,6 @@ import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.abel.EntityPosition;
|
||||
import net.sourceforge.plantuml.abel.Together;
|
||||
import net.sourceforge.plantuml.decoration.symbol.USymbols;
|
||||
import net.sourceforge.plantuml.dot.GraphvizVersion;
|
||||
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||
@ -72,7 +71,7 @@ public class ClusterDotString {
|
||||
}
|
||||
|
||||
void printInternal(StringBuilder sb, Collection<SvekLine> lines, StringBounder stringBounder, DotMode dotMode,
|
||||
GraphvizVersion graphvizVersion, UmlDiagramType type, Together parentTogether) {
|
||||
GraphvizVersion graphvizVersion, UmlDiagramType type) {
|
||||
if (cluster.diagram.getPragma().useKermor()) {
|
||||
new ClusterDotStringKermor(cluster, skinParam).printInternal(sb, lines, stringBounder, dotMode,
|
||||
graphvizVersion, type);
|
||||
@ -82,7 +81,7 @@ public class ClusterDotString {
|
||||
|
||||
if (packed) {
|
||||
cluster.printCluster1(sb, lines, stringBounder);
|
||||
final SvekNode added = cluster.printCluster2(sb, lines, stringBounder, dotMode, graphvizVersion, type, parentTogether);
|
||||
final SvekNode added = cluster.printCluster2(sb, lines, stringBounder, dotMode, graphvizVersion, type);
|
||||
return;
|
||||
|
||||
}
|
||||
@ -171,7 +170,7 @@ public class ClusterDotString {
|
||||
// -----------
|
||||
cluster.printCluster1(sb, lines, stringBounder);
|
||||
|
||||
final SvekNode added = cluster.printCluster2(sb, lines, stringBounder, dotMode, graphvizVersion, type, parentTogether);
|
||||
final SvekNode added = cluster.printCluster2(sb, lines, stringBounder, dotMode, graphvizVersion, type);
|
||||
if (entityPositionsExceptNormal.size() > 0)
|
||||
if (hasPort()) {
|
||||
sb.append(empty() + " [shape=rect,width=.01,height=.01,label=");
|
||||
|
@ -214,7 +214,7 @@ public class DotStringFactory implements Moveable {
|
||||
line.appendLine(getGraphvizVersion(), sb, dotMode, dotSplines);
|
||||
|
||||
root.printCluster2(sb, bibliotekon.allLines(), stringBounder, dotMode, getGraphvizVersion(),
|
||||
umlDiagramType, null);
|
||||
umlDiagramType);
|
||||
|
||||
for (SvekLine line : bibliotekon.lines1())
|
||||
line.appendLine(getGraphvizVersion(), sb, dotMode, dotSplines);
|
||||
|
Loading…
Reference in New Issue
Block a user