From 869143866ff42b9993dfc0385cee3de622dae174 Mon Sep 17 00:00:00 2001 From: Kir Ax Date: Sun, 14 Mar 2021 23:37:50 +0700 Subject: [PATCH] Make interactive SVG for Object diagrams --- src/net/sourceforge/plantuml/svek/image/EntityImageMap.java | 5 +++++ .../sourceforge/plantuml/svek/image/EntityImageObject.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java b/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java index d13bcd1cc..a6b45e88f 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageMap.java @@ -73,6 +73,7 @@ import net.sourceforge.plantuml.ugraphic.ULayoutGroup; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; +import net.sourceforge.plantuml.ugraphic.UGroupType; import net.sourceforge.plantuml.ugraphic.color.HColor; public class EntityImageMap extends AbstractEntityImage implements Stencil, WithPorts { @@ -151,6 +152,8 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With } final UStroke stroke = getStroke(); + + ug.startGroup(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); ug.apply(stroke).draw(rect); final ULayoutGroup header = new ULayoutGroup(new PlacementStrategyY1Y2(ug.getStringBounder())); @@ -167,6 +170,8 @@ public class EntityImageMap extends AbstractEntityImage implements Stencil, With if (url != null) { ug.closeUrl(); } + + ug.closeGroup(); } private UStroke getStroke() { diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java b/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java index a1c1c4d64..e0bd2da3c 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java @@ -72,6 +72,7 @@ import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.color.HColor; +import net.sourceforge.plantuml.ugraphic.UGroupType; public class EntityImageObject extends AbstractEntityImage implements Stencil { @@ -156,6 +157,8 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil { } final UStroke stroke = getStroke(); + + ug.startGroup(UGroupType.CLASS, "elem " + getEntity().getCode() + " selected"); ug.apply(stroke).draw(rect); final ULayoutGroup header = new ULayoutGroup(new PlacementStrategyY1Y2(ug.getStringBounder())); @@ -171,6 +174,8 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil { if (url != null) { ug.closeUrl(); } + + ug.closeGroup(); } private UStroke getStroke() {