feat(canvas): 画布背景 - 默认网格由点阵改为线条

新建画布、读取未指定背景的画布、公开分享页,以及 InfiniteCanvas 组件自身的 prop
默认值,统一改为 lines。

四处默认值必须一起改:store 的新建与恢复分支各一份、分享页一份、组件 prop 默认一份。
漏掉任意一处就会出现「自己的画布是线条、分享出去变点阵」这类不报错的不一致。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
dlhandClaude Fable 5 committed 2026-08-22 12:33:10 +08:00
1 parent 9a8f916e88
commit d3cbb57956
3 files changed
+5 -5

No files matched your search

@@ -39,7 +39,7 @@ type PinchState = {
initialScale: number;
};
export function InfiniteCanvas({ containerRef, viewport, backgroundMode = "dots", onViewportChange, onViewportPreviewChange, onCanvasMouseDown, boxSelectEnabled = false, onCanvasDoubleClick, onCanvasDeselect, onContextMenu, onDrop, onFileDragEnter, onFileDragLeave, onFileDragOver, graphicsLayer, children }: InfiniteCanvasProps) {
export function InfiniteCanvas({ containerRef, viewport, backgroundMode = "lines", onViewportChange, onViewportPreviewChange, onCanvasMouseDown, boxSelectEnabled = false, onCanvasDoubleClick, onCanvasDeselect, onContextMenu, onDrop, onFileDragEnter, onFileDragLeave, onFileDragOver, graphicsLayer, children }: InfiniteCanvasProps) {
const theme = canvasThemes[useThemeStore((state) => state.theme)];
const panState = useRef({
isPanning: false,