From eec6f7336cd987cdb1fc98dc99b0ac58b38c26fa Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Fri, 5 Dec 2025 11:21:33 +0800 Subject: [PATCH 1/3] fix (note_map): map overflows when switching map type in ribbon --- apps/client/src/widgets/note_map/NoteMap.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/client/src/widgets/note_map/NoteMap.tsx b/apps/client/src/widgets/note_map/NoteMap.tsx index 1c503c363..4e466a563 100644 --- a/apps/client/src/widgets/note_map/NoteMap.tsx +++ b/apps/client/src/widgets/note_map/NoteMap.tsx @@ -101,7 +101,7 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) { useEffect(() => { if (!containerSize || !graphRef.current) return; graphRef.current.width(containerSize.width).height(containerSize.height); - }, [ containerSize?.width, containerSize?.height ]); + }, [ containerSize?.width, containerSize?.height, mapType ]); // Fixing nodes when dragged. useEffect(() => { From 85b4f652f454d2d5f3292008e5f40585036f0e1a Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Fri, 5 Dec 2025 11:21:44 +0800 Subject: [PATCH 2/3] chore(note_map): improve the icon for expanding/collapsing the map --- apps/client/src/widgets/ribbon/NoteMapTab.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/ribbon/NoteMapTab.tsx b/apps/client/src/widgets/ribbon/NoteMapTab.tsx index ec7f4a749..c803dfa02 100644 --- a/apps/client/src/widgets/ribbon/NoteMapTab.tsx +++ b/apps/client/src/widgets/ribbon/NoteMapTab.tsx @@ -29,14 +29,14 @@ export default function NoteMapTab({ note }: TabContext) { {!isExpanded ? ( setExpanded(true)} /> ) : ( setExpanded(false)} From 2d33b8a9586ae10b4eacf97201348f56b7782b51 Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Fri, 5 Dec 2025 15:21:06 +0800 Subject: [PATCH 3/3] fix(note_map): initialize map state when switching map type in ribbon --- apps/client/src/widgets/note_map/NoteMap.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/note_map/NoteMap.tsx b/apps/client/src/widgets/note_map/NoteMap.tsx index 4e466a563..12e15202d 100644 --- a/apps/client/src/widgets/note_map/NoteMap.tsx +++ b/apps/client/src/widgets/note_map/NoteMap.tsx @@ -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 (