From 269c2828c06270b56308548c4fa64fcb7e588a0f Mon Sep 17 00:00:00 2001 From: qwazer Date: Wed, 6 Feb 2019 17:41:01 +0300 Subject: [PATCH] Add ability to use any shape from USymbol in nwdiag elements. Example: @startuml nwdiag { network inet { web01 [shape = cloud] } } @enduml --- src/net/sourceforge/plantuml/nwdiag/DiagElement.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/net/sourceforge/plantuml/nwdiag/DiagElement.java b/src/net/sourceforge/plantuml/nwdiag/DiagElement.java index a94cb2f6d..a5a50323b 100644 --- a/src/net/sourceforge/plantuml/nwdiag/DiagElement.java +++ b/src/net/sourceforge/plantuml/nwdiag/DiagElement.java @@ -109,11 +109,9 @@ public class DiagElement { } public final void setShape(String shapeName) { - if ("database".equalsIgnoreCase(shapeName)) { - this.shape = USymbol.DATABASE; - } - if ("node".equalsIgnoreCase(shapeName)) { - this.shape = USymbol.NODE; + USymbol shapeFromString = USymbol.getFromString(shapeName); + if (shapeFromString!=null){ + this.shape = shapeFromString; } }