fix: graph SVG fills container height, fallback to viewport calc
This commit is contained in:
parent
e8ae2b50ea
commit
9edb381c85
2 changed files with 3 additions and 1 deletions
|
|
@ -285,6 +285,8 @@ textarea.input-field {
|
||||||
|
|
||||||
.graph-container svg {
|
.graph-container svg {
|
||||||
display: block;
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Node detail panel */
|
/* Node detail panel */
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ function graphComponent() {
|
||||||
if (memories.length === 0) return;
|
if (memories.length === 0) return;
|
||||||
|
|
||||||
const width = container.clientWidth || container.parentElement?.clientWidth || 800;
|
const width = container.clientWidth || container.parentElement?.clientWidth || 800;
|
||||||
const height = container.clientHeight || 500;
|
const height = Math.max(container.clientHeight, window.innerHeight - 180);
|
||||||
|
|
||||||
// Build nodes and tag-based edges
|
// Build nodes and tag-based edges
|
||||||
const nodes = memories.map(m => ({
|
const nodes = memories.map(m => ({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue