Skip to content

Commit d8f2912

Browse files
committed
Tighten fit-view padding (nodes 20→10, viewport buffer 20→10)
1 parent d5be490 commit d8f2912

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/lib/components/FlowUpdater.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666
6767
// Add some padding around the nodes themselves
68-
const nodePadding = 20;
68+
const nodePadding = 10;
6969
minX -= nodePadding;
7070
minY -= nodePadding;
7171
maxX += nodePadding;

src/routes/+page.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,20 +380,20 @@
380380
381381
// Right panels: Code Editor or Simulation (Properties)
382382
const rightPanelWidth = showCodeEditor ? codeEditorWidth : showProperties ? propertiesPanelWidth : 0;
383-
const rightPx = (rightPanelWidth > 0 ? rightPanelWidth + PANEL_GAP : 0) + 20; // 20px extra buffer
383+
const rightPx = (rightPanelWidth > 0 ? rightPanelWidth + PANEL_GAP : 0) + 10;
384384
385385
// Bottom panels: Plot and Console - only use heights of panels that are actually open
386-
let bottomPx = 20;
386+
let bottomPx = 10;
387387
if (showPlot && showConsole) {
388-
bottomPx = Math.max(plotPanelHeight, consolePanelHeight) + PANEL_GAP + 20;
388+
bottomPx = Math.max(plotPanelHeight, consolePanelHeight) + PANEL_GAP + 10;
389389
} else if (showPlot) {
390-
bottomPx = plotPanelHeight + PANEL_GAP + 20;
390+
bottomPx = plotPanelHeight + PANEL_GAP + 10;
391391
} else if (showConsole) {
392-
bottomPx = consolePanelHeight + PANEL_GAP + 20;
392+
bottomPx = consolePanelHeight + PANEL_GAP + 10;
393393
}
394394
395395
// Top: Navigation bar
396-
const topPx = NAV_HEIGHT + 20; // 20px extra buffer
396+
const topPx = NAV_HEIGHT + 10;
397397
398398
setFitViewPadding({
399399
top: topPx,

0 commit comments

Comments
 (0)