Skip to content

Commit 9fcee9c

Browse files
committed
Fix (NoteMap): map overflows when switching type in ribbon (#7939)
1 parent d173cc9 commit 9fcee9c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎apps/client/src/widgets/note_map/NoteMap.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) {
9595
if (!graphRef.current || !notesAndRelationsRef.current) return;
9696
graphRef.current.d3Force("link")?.distance(linkDistance);
9797
graphRef.current.graphData(notesAndRelationsRef.current);
98-
}, [ linkDistance ]);
98+
}, [ linkDistance, mapType ]);
9999

100100
// React to container size
101101
useEffect(() => {
102102
if (!containerSize || !graphRef.current) return;
103103
graphRef.current.width(containerSize.width).height(containerSize.height);
104-
}, [ containerSize?.width, containerSize?.height ]);
104+
}, [ containerSize?.width, containerSize?.height, mapType ]);
105105

106106
// Fixing nodes when dragged.
107107
useEffect(() => {
@@ -114,7 +114,7 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) {
114114
node.fy = undefined;
115115
}
116116
})
117-
}, [ fixNodes ]);
117+
}, [ fixNodes, mapType ]);
118118

119119
return (
120120
<div className="note-map-widget">

‎apps/client/src/widgets/ribbon/NoteMapTab.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ export default function NoteMapTab({ note }: TabContext) {
2929

3030
{!isExpanded ? (
3131
<ActionButton
32-
icon="bx bx-arrow-to-bottom"
32+
icon="bx bx-expand-vertical"
3333
text={t("note_map.open_full")}
3434
className="open-full-button"
3535
onClick={() => setExpanded(true)}
3636
/>
3737
) : (
3838
<ActionButton
39-
icon="bx bx-arrow-to-top"
39+
icon="bx bx-collapse-vertical"
4040
text={t("note_map.collapse")}
4141
className="collapse-button"
4242
onClick={() => setExpanded(false)}

0 commit comments

Comments
 (0)