diff options
author | dinhanhtruong <70963346+dinhanhtruong@users.noreply.github.com> | 2021-07-08 15:51:26 -0400 |
---|---|---|
committer | dinhanhtruong <70963346+dinhanhtruong@users.noreply.github.com> | 2021-07-08 15:51:26 -0400 |
commit | 3c834ee55899b91f5fff8cfe5c808607f942b9f3 (patch) | |
tree | a3bc53d8e732996254a5db0746bdd850ce2bc1a5 /src/client/views/nodes/LinkDocPreview.tsx | |
parent | 61f5e6edac1967480e31c6407e3505eea2a08c26 (diff) |
created front-end link popup on text highlight
added button to AnchorMenu marquee selector for showing the link popup after highlighting text. created the front end of the popup. need to fix visibility when clicking out
Diffstat (limited to 'src/client/views/nodes/LinkDocPreview.tsx')
-rw-r--r-- | src/client/views/nodes/LinkDocPreview.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/LinkDocPreview.tsx b/src/client/views/nodes/LinkDocPreview.tsx index 65afbe131..b73fb10df 100644 --- a/src/client/views/nodes/LinkDocPreview.tsx +++ b/src/client/views/nodes/LinkDocPreview.tsx @@ -110,11 +110,11 @@ export class LinkDocPreview extends React.Component<LinkDocPreviewProps> { } } width = () => { - if (!this._targetDoc) return 500; + if (!this._targetDoc) return 225; if (this._targetDoc[WidthSym]() < this._targetDoc?.[HeightSym]()) { return Math.min(225, this._targetDoc[HeightSym]()) * this._targetDoc[WidthSym]() / this._targetDoc[HeightSym](); } - return Math.min(500, NumCast(this._targetDoc?.[WidthSym](), 500)); + return Math.min(225, NumCast(this._targetDoc?.[WidthSym](), 225)); } height = () => { if (!this._targetDoc) return 225; |