diff --git a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java index 922a20389..5564c8b38 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java +++ b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java @@ -52,6 +52,7 @@ import net.sourceforge.plantuml.cucadiagram.Ident; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy; import net.sourceforge.plantuml.graphic.USymbol; +import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; import net.sourceforge.plantuml.utils.UniqueSequence; public class ActivityDiagram extends CucaDiagram { @@ -206,4 +207,9 @@ public class ActivityDiagram extends CucaDiagram { lastEntityBrancheConsulted = null; } + @Override + public ClockwiseTopRightBottomLeft getDefaultMargins() { + // Strange numbers here for backwards compatibility + return ClockwiseTopRightBottomLeft.topRightBottomLeft(-1, 5, 5, 6); + } } diff --git a/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java b/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java index 26145a015..7bcc68f64 100644 --- a/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java +++ b/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java @@ -55,6 +55,7 @@ import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.objectdiagram.AbstractClassOrObjectDiagram; +import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; import net.sourceforge.plantuml.svek.image.EntityImageClass; import net.sourceforge.plantuml.ugraphic.ImageBuilder; import net.sourceforge.plantuml.ugraphic.ImageParameter; @@ -234,4 +235,9 @@ public class ClassDiagram extends AbstractClassOrObjectDiagram { return super.checkFinalError(); } + @Override + public ClockwiseTopRightBottomLeft getDefaultMargins() { + // Strange numbers here for backwards compatibility + return ClockwiseTopRightBottomLeft.topRightBottomLeft(-1, 5, 5, 7); + } } diff --git a/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java b/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java index 89375d3d6..1950c08bc 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java +++ b/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java @@ -62,7 +62,6 @@ import net.sourceforge.plantuml.sdot.CucaDiagramFileMakerSmetana; import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.skin.VisibilityModifier; import net.sourceforge.plantuml.statediagram.StateDiagram; -import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; import net.sourceforge.plantuml.svek.CucaDiagramFileMaker; import net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek; import net.sourceforge.plantuml.ugraphic.color.ColorMapper; @@ -919,9 +918,4 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, link2.setLinkConstraint(linkConstraint); return CommandExecutionResult.ok(); } - - @Override - public ClockwiseTopRightBottomLeft getDefaultMargins() { - return ClockwiseTopRightBottomLeft.topRightBottomLeft(0, 5, 5, 0); - } } diff --git a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java index f9475f900..0b2c27da6 100644 --- a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java +++ b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagram.java @@ -44,6 +44,7 @@ import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Ident; import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.graphic.USymbol; +import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; public class DescriptionDiagram extends AbstractEntityDiagram { @@ -127,4 +128,9 @@ public class DescriptionDiagram extends AbstractEntityDiagram { return super.checkFinalError(); } + @Override + public ClockwiseTopRightBottomLeft getDefaultMargins() { + // Strange numbers here for backwards compatibility + return ClockwiseTopRightBottomLeft.topRightBottomLeft(-1, 5, 5, 7); + } } diff --git a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java index 0c7b89d25..5a8988a54 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java +++ b/src/net/sourceforge/plantuml/sequencediagram/SequenceDiagram.java @@ -531,6 +531,8 @@ public class SequenceDiagram extends UmlDiagram { @Override public ClockwiseTopRightBottomLeft getDefaultMargins() { - return ClockwiseTopRightBottomLeft.same(5); + return modeTeoz() // this is for backward compatibility + ? ClockwiseTopRightBottomLeft.same(5) + : ClockwiseTopRightBottomLeft.topRightBottomLeft(5, 5, 5, 0); } } diff --git a/src/net/sourceforge/plantuml/statediagram/StateDiagram.java b/src/net/sourceforge/plantuml/statediagram/StateDiagram.java index 5a745310d..38bf5980c 100644 --- a/src/net/sourceforge/plantuml/statediagram/StateDiagram.java +++ b/src/net/sourceforge/plantuml/statediagram/StateDiagram.java @@ -50,6 +50,7 @@ import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.Link; import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy; import net.sourceforge.plantuml.graphic.USymbol; +import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; import net.sourceforge.plantuml.utils.UniqueSequence; public class StateDiagram extends AbstractEntityDiagram { @@ -307,4 +308,9 @@ public class StateDiagram extends AbstractEntityDiagram { } + @Override + public ClockwiseTopRightBottomLeft getDefaultMargins() { + // Strange numbers here for backwards compatibility + return ClockwiseTopRightBottomLeft.topRightBottomLeft(-2, 5, 5, 7); + } }