diff options
author | bobzel <zzzman@gmail.com> | 2023-03-23 17:01:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 17:01:51 -0400 |
commit | 9569fc333ffc3496f3a91989da778449271f323c (patch) | |
tree | 23e1b83253a91dc08a3171e1654bf4739524d5c7 /src/client/views/nodes/DocumentView.tsx | |
parent | 44a6c5cabd35e8f7734d6f70128245ba5379d3c1 (diff) | |
parent | 2c27974f2bce7ef847aa6aaff042e4ddc9b4aa89 (diff) |
Merge pull request #162 from brown-dash/schema-mehek
new schema view
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 9e4c21a29..f34ac2b44 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -208,6 +208,7 @@ export interface DocumentViewProps extends DocumentViewSharedProps { hideDocumentButtonBar?: boolean; hideOpenButton?: boolean; hideDeleteButton?: boolean; + hideLinkAnchors?: boolean; treeViewDoc?: Doc; isDocumentActive?: () => boolean | undefined; // whether a document should handle pointer events isContentActive: () => boolean | undefined; // whether document contents should handle pointer events @@ -614,7 +615,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps } } else if (!this._longPress && this.onClickHandler?.script && !isScriptBox()) { // bcz: hack? don't execute script if you're clicking on a scripting box itself - const { clientX, clientY, shiftKey, altKey } = e; + const { clientX, clientY, shiftKey, altKey, metaKey } = e; const func = () => this.onClickHandler?.script.run( { @@ -628,6 +629,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps clientY, shiftKey, altKey, + metaKey, }, console.log ).result?.select === true @@ -1212,6 +1214,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps @computed get allLinkEndpoints() { // the small blue dots that mark the endpoints of links TraceMobx(); + if (this.props.hideLinkAnchors) return null; if (this.layoutDoc.unrendered || this.props.LayoutTemplateString?.includes(LinkAnchorBox.name)) return null; if (this.rootDoc.type === DocumentType.PRES || this.rootDoc.type === DocumentType.LINK || this.props.dontRegisterView) return null; const filtered = DocUtils.FilterDocs(this.directLinks, this.props.docFilters?.() ?? [], []).filter(d => d.linkDisplay); |