feat: clamp AddMenu to viewport
All checks were successful
🚀 Lint & Test & Deploy / release (push) Successful in 4m10s
All checks were successful
🚀 Lint & Test & Deploy / release (push) Successful in 4m10s
This commit is contained in:
@@ -17,9 +17,11 @@
|
||||
import { MouseEventManager } from './mouse.events';
|
||||
|
||||
const {
|
||||
keymap
|
||||
keymap,
|
||||
addMenuPadding
|
||||
}: {
|
||||
keymap: ReturnType<typeof createKeyMap>;
|
||||
addMenuPadding?: { left?: number; right?: number; bottom?: number; top?: number };
|
||||
} = $props();
|
||||
|
||||
const graph = getGraphManager();
|
||||
@@ -160,7 +162,13 @@
|
||||
|
||||
{#if graph.status === 'idle'}
|
||||
{#if graphState.addMenuPosition}
|
||||
<AddMenu onnode={handleNodeCreation} />
|
||||
<AddMenu
|
||||
onnode={handleNodeCreation}
|
||||
paddingTop={addMenuPadding?.top}
|
||||
paddingRight={addMenuPadding?.right}
|
||||
paddingBottom={addMenuPadding?.bottom}
|
||||
paddingLeft={addMenuPadding?.left}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{#if graphState.activeSocket}
|
||||
|
||||
Reference in New Issue
Block a user