From f2865c7bb06f0f8df3e23436e444fd6584a34956 Mon Sep 17 00:00:00 2001 From: L-Sun Date: Thu, 3 Apr 2025 13:17:47 +0000 Subject: [PATCH] fix(editor): prevent white edges in grid background by rounding grid gap (#11454) Close [BS-2147](https://linear.app/affine-design/issue/BS-2147/%E7%A7%BB%E5%8A%A8%E7%AB%AF%EF%BC%8C%E5%8D%95%E6%8C%87%E6%BB%91%E5%8A%A8%E6%97%B6%E4%BC%9A%E5%87%BA%E7%8E%B0%E5%AF%B9%E9%BD%90%E7%BA%BF) --- .../affine/blocks/block-surface/src/utils/get-bg-grip-gap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocksuite/affine/blocks/block-surface/src/utils/get-bg-grip-gap.ts b/blocksuite/affine/blocks/block-surface/src/utils/get-bg-grip-gap.ts index 69e0c3ec9b..f734f91b2d 100644 --- a/blocksuite/affine/blocks/block-surface/src/utils/get-bg-grip-gap.ts +++ b/blocksuite/affine/blocks/block-surface/src/utils/get-bg-grip-gap.ts @@ -6,5 +6,5 @@ export function getBgGridGap(zoom: number) { const step = zoom < 0.5 ? 2 : 1 / (Math.floor(zoom) || 1); const gap = clamp(20 * step * zoom, GRID_GAP_MIN, GRID_GAP_MAX); - return gap; + return Math.round(gap); }