fix(canvas): 画布视觉 - 收敛边框与网格样式

This commit is contained in:
ddCat committed 2026-08-22 13:09:34 +08:00
1 parent 772e7bbef7
commit 227e548503
5 files changed
+12 -13

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ export const CANVAS_SELECTION_PREVIEW_EVENT = "canvas:selection-preview";
// 空间网格点模式的点半径(像素单位)。远距(缩放 < 0.12)时用更小半径避免糊成一团。
// 同时被 <CanvasGrid>(infinite-canvas)与滚动同步(applyCanvasLiveViewport)共享,避免两处漂移。
export function canvasDotPx(scale: number): string {
return scale < 0.12 ? "1.2px" : "2px";
return scale < 0.12 ? "0.8px" : "1.25px";
}
export function applyCanvasLiveViewport(container: HTMLDivElement | null, viewport: ViewportTransform, notify = true) {