fix(diagram): restore auto-layout reading zoom to 85%

Keep DIAGRAM_READABLE_MIN_SCALE at 0.85 so architecture and mind-map auto layout stay at the previous reading size.
This commit is contained in:
tianma-if committed 2026-09-10 19:07:29 +08:00
1 parent ab7b3ecf47
commit 30717d4207
2 files changed
+2 -2

No files matched your search

@@ -122,6 +122,6 @@ describe("flowchart readable viewport", () => {
test("refuses to shrink a tall flow below reading size", () => {
expect(flowchartFitsReadableViewport({ width: 220, height: 1680 }, viewport)).toBe(false);
expect(FLOWCHART_READABLE_MIN_SCALE).toBe(DIAGRAM_READABLE_MIN_SCALE);
expect(DIAGRAM_READABLE_MIN_SCALE).toBe(0.75);
expect(DIAGRAM_READABLE_MIN_SCALE).toBe(0.85);
});
});
@@ -43,7 +43,7 @@ export const FLOWCHART_LAYOUT_SPACING = { rank: 56, node: 36 };
// Auto layout and opening stay at reading size. Shrinking the whole graph into
// the viewport makes large notes unreadable; show the start and let the canvas scroll.
export const DIAGRAM_READABLE_MIN_SCALE = 0.75;
export const DIAGRAM_READABLE_MIN_SCALE = 0.85;
export const FLOWCHART_READABLE_MIN_SCALE = DIAGRAM_READABLE_MIN_SCALE;
export const flowchartFitsReadableViewport = (