From c4d81dda2c4b114b60f8a74abda3b89fe3e65f89 Mon Sep 17 00:00:00 2001
From: MarcosPierasNL <pieras.marcos@gmail.com>
Date: Mon, 19 Aug 2024 10:57:07 +0200
Subject: [PATCH] fix: consider width hyperedge line for correct alignment

---
 .../visualizations/paohvis/components/HyperRangeBlock.tsx   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libs/shared/lib/vis/visualizations/paohvis/components/HyperRangeBlock.tsx b/libs/shared/lib/vis/visualizations/paohvis/components/HyperRangeBlock.tsx
index 0fd206555..a90c9f44e 100644
--- a/libs/shared/lib/vis/visualizations/paohvis/components/HyperRangeBlock.tsx
+++ b/libs/shared/lib/vis/visualizations/paohvis/components/HyperRangeBlock.tsx
@@ -105,7 +105,7 @@ export const HyperEdgeRangesBlock: React.FC<HyperEdgeRangesBlockProps> = ({
     setIconColors(iconColorsTemporal);
     setIconComponents(updatedIconComponents);
   }, [sortState, headerState, hoverRowIndex]);
-
+  const widthHyperEdge = 0.075 * rowHeight;
   return (
     <>
       <g key={'hyperEdgeInformationTop'} className="hyperEdgeInformation">
@@ -316,7 +316,7 @@ export const HyperEdgeRangesBlock: React.FC<HyperEdgeRangesBlockProps> = ({
             >
               <g
                 key={'groupBlockExtra-' + indexHyperEdgeRange}
-                transform={`translate(${rowLabelColumnWidth + indexHyperEdgeRange * rowHeight + 0.5 * rowHeight},${yOffset + 0.5 * rowHeight})`}
+                transform={`translate(${rowLabelColumnWidth + indexHyperEdgeRange * rowHeight + 0.5 * rowHeight - widthHyperEdge / 2.0},${yOffset + 0.5 * rowHeight})`}
               >
                 {currentPageRows && dataLinesHyperedges[indexHyperEdgeRange]?.valid && (
                   <CustomLine
@@ -325,7 +325,7 @@ export const HyperEdgeRangesBlock: React.FC<HyperEdgeRangesBlockProps> = ({
                     y1={(dataLinesHyperedges[indexHyperEdgeRange].y0 - currentPageRows.startIndexRow) * rowHeight}
                     x2={0}
                     y2={(dataLinesHyperedges[indexHyperEdgeRange].y1 - currentPageRows.startIndexRow) * rowHeight}
-                    strokeWidth={0.075 * rowHeight}
+                    strokeWidth={widthHyperEdge}
                     className={configStyle.colorLinesGridByClass}
                   />
                 )}
-- 
GitLab