From 61f5e6edac1967480e31c6407e3505eea2a08c26 Mon Sep 17 00:00:00 2001 From: dinhanhtruong <70963346+dinhanhtruong@users.noreply.github.com> Date: Mon, 28 Jun 2021 16:31:02 -0400 Subject: linkMenu comments added linkMenu comments --- src/client/views/linking/LinkMenu.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/client/views/linking/LinkMenu.tsx') diff --git a/src/client/views/linking/LinkMenu.tsx b/src/client/views/linking/LinkMenu.tsx index c7888c5ee..6fc860447 100644 --- a/src/client/views/linking/LinkMenu.tsx +++ b/src/client/views/linking/LinkMenu.tsx @@ -15,6 +15,9 @@ interface Props { changeFlyout: () => void; } +/** + * the outermost component for the link menu of a node that contains a list of its linked nodes + */ @observer export class LinkMenu extends React.Component { private _editorRef = React.createRef(); @@ -36,6 +39,11 @@ export class LinkMenu extends React.Component { } } + /** + * maps each link to a JSX element to be rendered + * @param groups LinkManager containing info of all of the links + * @returns list of link JSX elements if there at least one linked element + */ renderAllGroups = (groups: Map>): Array => { const linkItems = Array.from(groups.entries()).map(group =>