From 232a0a02d509c8b961b0d124b2958e8cb8c2ca29 Mon Sep 17 00:00:00 2001 From: Matthew Runyon Date: Thu, 12 May 2022 15:53:05 -0500 Subject: [PATCH 1/2] Fix floating column border not touching top and bottom --- packages/grid/src/GridRenderer.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/grid/src/GridRenderer.ts b/packages/grid/src/GridRenderer.ts index a449319766..d97e1b09cf 100644 --- a/packages/grid/src/GridRenderer.ts +++ b/packages/grid/src/GridRenderer.ts @@ -515,16 +515,16 @@ export class GridRenderer { getOrThrow(visibleColumnXs, floatingLeftColumnCount - 1) + getOrThrow(visibleColumnWidths, floatingLeftColumnCount - 1) + 0.5; - context.moveTo(x, 0.5); - context.lineTo(x, maxY - 0.5); + context.moveTo(x, 0); + context.lineTo(x, maxY); } if (floatingRightColumnCount > 0) { const x = getOrThrow(visibleColumnXs, columnCount - floatingRightColumnCount) - 0.5; - context.moveTo(x, 0.5); - context.lineTo(x, maxY - 0.5); + context.moveTo(x, 0); + context.lineTo(x, maxY); } context.stroke(); @@ -554,16 +554,16 @@ export class GridRenderer { getOrThrow(visibleColumnXs, floatingLeftColumnCount - 1) + getOrThrow(visibleColumnWidths, floatingLeftColumnCount - 1) + 0.5; - context.moveTo(x, 0.5); - context.lineTo(x, maxY - 0.5); + context.moveTo(x, 0); + context.lineTo(x, maxY); } if (floatingRightColumnCount > 0) { const x = getOrThrow(visibleColumnXs, columnCount - floatingRightColumnCount) - 0.5; - context.moveTo(x, 0.5); - context.lineTo(x, maxY - 0.5); + context.moveTo(x, 0); + context.lineTo(x, maxY); } context.stroke(); From bd3a64b762e914040ea954da2cd0ca559663a0d5 Mon Sep 17 00:00:00 2001 From: Matthew Runyon Date: Fri, 13 May 2022 13:26:26 -0500 Subject: [PATCH 2/2] Fix incorrect half pixel on horizontal frozen lines --- packages/grid/src/GridRenderer.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/grid/src/GridRenderer.ts b/packages/grid/src/GridRenderer.ts index d97e1b09cf..d1de31895a 100644 --- a/packages/grid/src/GridRenderer.ts +++ b/packages/grid/src/GridRenderer.ts @@ -499,15 +499,15 @@ export class GridRenderer { getOrThrow(visibleRowYs, floatingTopRowCount - 1) + getOrThrow(visibleRowHeights, floatingTopRowCount - 1) + 0.5; - context.moveTo(0.5, y); - context.lineTo(maxX - 0.5, y); + context.moveTo(0, y); + context.lineTo(maxX, y); } if (floatingBottomRowCount > 0) { const y = getOrThrow(visibleRowYs, rowCount - floatingBottomRowCount) - 0.5; - context.moveTo(0.5, y); - context.lineTo(maxX - 0.5, y); + context.moveTo(0, y); + context.lineTo(maxX, y); } if (floatingLeftColumnCount > 0) { @@ -538,15 +538,15 @@ export class GridRenderer { getOrThrow(visibleRowYs, floatingTopRowCount - 1) + getOrThrow(visibleRowHeights, floatingTopRowCount - 1) + 0.5; - context.moveTo(0.5, y); - context.lineTo(maxX - 0.5, y); + context.moveTo(0, y); + context.lineTo(maxX, y); } if (floatingBottomRowCount > 0) { const y = getOrThrow(visibleRowYs, rowCount - floatingBottomRowCount) - 0.5; - context.moveTo(0.5, y); - context.lineTo(maxX - 0.5, y); + context.moveTo(0, y); + context.lineTo(maxX, y); } if (floatingLeftColumnCount > 0) {