mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-21 05:18:00 +00:00
fix(memory-graph): center arrow-key navigation in the visible graph area
selectAndCenter passed the full containerSize.height to viewport.centerOn, while every other navigation action (auto-fit, center, zoom) uses graphFitHeight, which on compact viewports subtracts the space taken by the bottom controls. centerOn places the target at height/2, so keyboard navigation dropped the selected node at the midpoint of the whole container, partly behind the bottom control bar on mobile, instead of the midpoint of the visible graph area like the center button does. Use graphFitHeight so arrow-key selection lands where the other centering paths already do.
This commit is contained in:
parent
90f709bf8d
commit
3cf299d825
1 changed files with 2 additions and 2 deletions
|
|
@ -467,10 +467,10 @@ export function MemoryGraph({
|
|||
n.x,
|
||||
n.y,
|
||||
containerSize.width,
|
||||
containerSize.height,
|
||||
graphFitHeight,
|
||||
)
|
||||
},
|
||||
[nodes, containerSize.width, containerSize.height],
|
||||
[nodes, containerSize.width, graphFitHeight],
|
||||
)
|
||||
|
||||
const navigateUp = useCallback(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue