mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 18:02:47 +08:00
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)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user