diff options
author | bobzel <zzzman@gmail.com> | 2022-04-13 10:57:08 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-04-13 10:57:08 -0400 |
commit | 594f585b74bf6ecec3795a4b780da619c66f341d (patch) | |
tree | 6deb0f0589351e53294f524aca628d7566b0c44c /src/client/views/nodes/LinkDocPreview.tsx | |
parent | 9fe8d2f771d5029b7c4c9fbd9c6dd316c88f02cd (diff) |
added images to treeView bullets for docs with icons. fixed following pushpin links to prototypes to toggle delegates when shown. gave groups a default padding. fixed creating icons to not create unnecessary template docs. fixed toggling isPushpin. made summaries simple links instead of templates.
Diffstat (limited to 'src/client/views/nodes/LinkDocPreview.tsx')
-rw-r--r-- | src/client/views/nodes/LinkDocPreview.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/views/nodes/LinkDocPreview.tsx b/src/client/views/nodes/LinkDocPreview.tsx index d5f3f3b4e..eca2e3cfd 100644 --- a/src/client/views/nodes/LinkDocPreview.tsx +++ b/src/client/views/nodes/LinkDocPreview.tsx @@ -15,6 +15,7 @@ import { DocumentView, DocumentViewSharedProps } from "./DocumentView"; import './LinkDocPreview.scss'; import React = require("react"); import { DocumentType } from '../../documents/DocumentTypes'; +import { DragManager } from '../../util/DragManager'; interface LinkDocPreviewProps { linkDoc?: Doc; @@ -137,7 +138,13 @@ export class LinkDocPreview extends React.Component<LinkDocPreviewProps> { @computed get previewHeader() { return !this._linkDoc || !this._targetDoc || !this._linkSrc ? (null) : <div className="linkDocPreview-info" ref={this._infoRef}> - <div className="linkDocPreview-title"> + <div className="linkDocPreview-title" style={{ pointerEvents: "all" }} + onPointerDown={e => { + DragManager.StartDocumentDrag([this._infoRef.current!], + new DragManager.DocumentDragData([this._targetDoc!]), e.pageX, e.pageY); + e.stopPropagation(); + LinkDocPreview.Clear(); + }}> {StrCast(this._targetDoc.title).length > 16 ? StrCast(this._targetDoc.title).substr(0, 16) + "..." : this._targetDoc.title} <p className="linkDocPreview-description"> {StrCast(this._linkDoc.description)}</p> </div> |