1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-09-29 07:29:00 +00:00

fix: fix bad note shape in sequence diagram

https://github.com/plantuml/plantuml/issues/1609
This commit is contained in:
Arnaud Roques 2023-11-23 20:42:31 +01:00
parent 422c74eba4
commit b48ea95112
2 changed files with 10 additions and 9 deletions

View File

@ -44,21 +44,22 @@ public enum NoteStyle {
NORMAL, HEXAGONAL, BOX;
public static NoteStyle getNoteStyle(String s) {
if (s.equalsIgnoreCase("hnote")) {
if (s.equalsIgnoreCase("hnote"))
return NoteStyle.HEXAGONAL;
} else if (s.equalsIgnoreCase("rnote")) {
if (s.equalsIgnoreCase("rnote"))
return NoteStyle.BOX;
}
return NoteStyle.NORMAL;
}
public ComponentType getNoteComponentType() {
if (this == NoteStyle.HEXAGONAL) {
if (this == NoteStyle.HEXAGONAL)
return ComponentType.NOTE_HEXAGONAL;
}
if (this == NoteStyle.BOX) {
if (this == NoteStyle.BOX)
return ComponentType.NOTE_BOX;
}
return ComponentType.NOTE;
}

View File

@ -46,7 +46,6 @@ import net.sourceforge.plantuml.sequencediagram.Note;
import net.sourceforge.plantuml.skin.ArrowComponent;
import net.sourceforge.plantuml.skin.ArrowConfiguration;
import net.sourceforge.plantuml.skin.Component;
import net.sourceforge.plantuml.skin.ComponentType;
import net.sourceforge.plantuml.style.ISkinParam;
class Step1MessageExo extends Step1Abstract {
@ -69,7 +68,8 @@ class Step1MessageExo extends Step1Abstract {
for (Note noteOnMessage : noteOnMessages) {
final ISkinParam skinParam = noteOnMessage.getSkinParamBackcolored(drawingSet.getSkinParam());
final Component note = drawingSet.getSkin().createComponentNote(noteOnMessage.getUsedStyles(),
ComponentType.NOTE, skinParam, noteOnMessage.getDisplay(), noteOnMessage.getColors());
noteOnMessage.getNoteStyle().getNoteComponentType(), skinParam, noteOnMessage.getDisplay(),
noteOnMessage.getColors());
addNote(note);
}