From 0813b747e33445015ce5f7b65873d2e04e467e4f Mon Sep 17 00:00:00 2001 From: Peter Schuller Date: Tue, 2 Aug 2022 18:43:52 +0200 Subject: [PATCH] adds HyperLinks to GANTT Milestones This resembles the behavior of "normal" tasks in the GANTT chart to enable linking of milestones. It is meant to resolve issue #1074 --- .../plantuml/project/draw/TaskDrawDiamond.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java b/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java index 2585fe2d0..d5dd31dd3 100644 --- a/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java +++ b/src/net/sourceforge/plantuml/project/draw/TaskDrawDiamond.java @@ -141,7 +141,16 @@ public class TaskDrawDiamond extends AbstractTaskDraw { 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) {