diff options
| author | bobzel <zzzman@gmail.com> | 2020-12-07 14:03:46 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-12-07 14:03:46 -0500 |
| commit | ff791402919478bf153179a6629752f2066edc29 (patch) | |
| tree | 31a97e7c2b0f8cdbc719aa871d80785147bcdeb9 /src/client/views/nodes/LinkDocPreview.tsx | |
| parent | 74b5ef7cd5f91d4483a407585bca0f6b93883208 (diff) | |
fixed lists to allow multiple null-value entries & be able to edit in KeyValuePane. cleaned up a lot of stuff with animation frames and got working again. fixed previews of links to text selections to preview properly.
Diffstat (limited to 'src/client/views/nodes/LinkDocPreview.tsx')
| -rw-r--r-- | src/client/views/nodes/LinkDocPreview.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/nodes/LinkDocPreview.tsx b/src/client/views/nodes/LinkDocPreview.tsx index 0256d394e..c4bb2b8d8 100644 --- a/src/client/views/nodes/LinkDocPreview.tsx +++ b/src/client/views/nodes/LinkDocPreview.tsx @@ -12,6 +12,7 @@ import { ContentFittingDocumentView } from "./ContentFittingDocumentView"; import { DocumentLinksButton } from './DocumentLinksButton'; import React = require("react"); import { DocumentViewProps } from './DocumentView'; +import { Id } from '../../../fields/FieldSymbols'; interface Props { linkDoc?: Doc; @@ -64,8 +65,11 @@ export class LinkDocPreview extends React.Component<Props> { runInAction(() => { this._toolTipText = ""; LinkDocPreview.TargetDoc = this._targetDoc = target; - if (anchor !== this._targetDoc && anchor && this._targetDoc) { - this._targetDoc._scrollPreviewY = NumCast(anchor?.y); + if (this._targetDoc) { + this._targetDoc._scrollToPreviewLinkID = linkDoc?.[Id]; + if (anchor !== this._targetDoc && anchor) { + this._targetDoc._scrollPreviewY = NumCast(anchor?.y); + } } }); } |
