From 1f1dc8cd24fe0f447d96868965a96a877db3b62e Mon Sep 17 00:00:00 2001 From: Olivier Druais Date: Tue, 22 Oct 2024 09:48:44 +0200 Subject: [PATCH 01/17] feat(bar): bar label always visible and centered - Make sure the bar label is centered on the visible part of the bar, even when the bar overflows. - The bar label is wrapped into a container whom position is calculated based on the barContainer position and bar position (xStart, xEnd) --- src/components/GGanttBar.vue | 44 ++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/src/components/GGanttBar.vue b/src/components/GGanttBar.vue index a8e1ce2b..c7ab127c 100644 --- a/src/components/GGanttBar.vue +++ b/src/components/GGanttBar.vue @@ -18,13 +18,15 @@ @mouseleave="onMouseEvent" @contextmenu="onMouseEvent" > -
- -
- {{ barConfig.label || "" }} -
-
- +
+
+ +
+ {{ barConfig.label || "" }} +
+
+ +