mirror of
https://github.com/zadam/trilium.git
synced 2025-12-06 23:44:25 +01:00
fix(note_map): initialize map state when switching map type in ribbon
This commit is contained in:
parent
85b4f652f4
commit
2d33b8a958
@ -95,7 +95,7 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) {
|
||||
if (!graphRef.current || !notesAndRelationsRef.current) return;
|
||||
graphRef.current.d3Force("link")?.distance(linkDistance);
|
||||
graphRef.current.graphData(notesAndRelationsRef.current);
|
||||
}, [ linkDistance ]);
|
||||
}, [ linkDistance, mapType ]);
|
||||
|
||||
// React to container size
|
||||
useEffect(() => {
|
||||
@ -114,7 +114,7 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) {
|
||||
node.fy = undefined;
|
||||
}
|
||||
})
|
||||
}, [ fixNodes ]);
|
||||
}, [ fixNodes, mapType ]);
|
||||
|
||||
return (
|
||||
<div className="note-map-widget">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user