Skip to content

Commit

Permalink
adds HyperLinks to GANTT Milestones
Browse files Browse the repository at this point in the history
This resembles the behavior of "normal" tasks in the GANTT chart to
enable linking of milestones.
It is meant to resolve issue plantuml#1074
  • Loading branch information
pzzz committed Aug 2, 2022
1 parent 5718bbe commit 0813b74
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,16 @@ public void drawU(UGraphic ug) {
final double x2 = timeScale.getEndingPosition(start);
final double width = getShapeHeight(ug.getStringBounder());
final double delta = x2 - x1 - width;

if (url != null) {
ug.startUrl(url);
}

drawShape(applyColors(ug).apply(UTranslate.dx(x1 + delta / 2)));

if (url != null) {
ug.closeUrl();
}
}

private UGraphic applyColors(UGraphic ug) {
Expand Down

0 comments on commit 0813b74

Please sign in to comment.