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 ++++++++ src/client/views/nodes/LinkDocPreview.tsx | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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 => { } } width = () => { - if (!this._targetDoc) return 225; + if (!this._targetDoc) return 500; if (this._targetDoc[WidthSym]() < this._targetDoc?.[HeightSym]()) { return Math.min(225, this._targetDoc[HeightSym]()) * this._targetDoc[WidthSym]() / this._targetDoc[HeightSym](); } - return Math.min(225, NumCast(this._targetDoc?.[WidthSym](), 225)); + return Math.min(500, NumCast(this._targetDoc?.[WidthSym](), 500)); } height = () => { if (!this._targetDoc) return 225; -- cgit v1.2.3-70-g09d2