From 21f313828a17f510d23646a6b6a063ad47c6b54b Mon Sep 17 00:00:00 2001 From: Laurent Fasani Date: Fri, 21 Jun 2024 12:28:49 +0200 Subject: [PATCH] Enlarge progress handle and update color on hover This is particularly useful when the progress is zero or 100% and then displayed at the same position than the start/end date handle. Signed-off-by: Laurent Fasani --- .../task-item/bar/bar-relation-handle.module.css | 4 ++++ src/components/task-item/bar/bar.module.css | 4 ++++ src/helpers/bar-helper.ts | 7 ++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/task-item/bar/bar-relation-handle.module.css b/src/components/task-item/bar/bar-relation-handle.module.css index cf2b74508..f9becc415 100644 --- a/src/components/task-item/bar/bar-relation-handle.module.css +++ b/src/components/task-item/bar/bar-relation-handle.module.css @@ -8,3 +8,7 @@ cursor: pointer; opacity: 0; } + +.barRelationHandle:hover { + fill: #a2a2a2; +} diff --git a/src/components/task-item/bar/bar.module.css b/src/components/task-item/bar/bar.module.css index 7ff4926f8..c451c1f0b 100644 --- a/src/components/task-item/bar/bar.module.css +++ b/src/components/task-item/bar/bar.module.css @@ -15,6 +15,10 @@ visibility: hidden; } +.barHandle:hover { + fill: #a2a2a2; +} + .barBackground { user-select: none; stroke-width: 0; diff --git a/src/helpers/bar-helper.ts b/src/helpers/bar-helper.ts index d63cead78..b7426821b 100644 --- a/src/helpers/bar-helper.ts +++ b/src/helpers/bar-helper.ts @@ -46,13 +46,14 @@ export const getProgressPoint = ( taskY: number, taskHeight: number ) => { + console.log("getProgressPoint"); const point = [ - progressX - 5, + progressX - 7, taskY + taskHeight, - progressX + 5, + progressX + 7, taskY + taskHeight, progressX, - taskY + taskHeight - 8.66, + taskY + taskHeight - 11, ]; return point.join(","); };