feat: clamp AddMenu to viewport
All checks were successful
🚀 Lint & Test & Deploy / release (push) Successful in 4m10s

This commit is contained in:
release-bot
2026-02-10 21:51:50 +01:00
parent a31a49ad50
commit 07cd9e84eb
5 changed files with 82 additions and 18 deletions

View File

@@ -63,6 +63,7 @@
let activeNode = $state<NodeInstance | undefined>(undefined);
let scene = $state<Group>(null!);
let sidebarOpen = $state(false);
let graphInterface = $state<ReturnType<typeof GraphInterface>>(null!);
let viewerComponent = $state<ReturnType<typeof Viewer>>();
const manager = $derived(graphInterface?.manager);
@@ -171,6 +172,7 @@
graph={pm.graph}
bind:this={graphInterface}
registry={nodeRegistry}
addMenuPadding={{ right: sidebarOpen ? 330 : undefined }}
backgroundType={appSettings.value.nodeInterface.backgroundType}
snapToGrid={appSettings.value.nodeInterface.snapToGrid}
bind:activeNode
@@ -181,7 +183,7 @@
onresult={(result) => handleUpdate(result as Graph)}
/>
{/if}
<Sidebar>
<Sidebar bind:open={sidebarOpen}>
<Panel id="general" title="General" icon="i-[tabler--settings]">
<NestedSettings
id="general"