From 24c4443cc097694a12c26b1e5aa1c7a7930625c1 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 30 Mar 2022 09:11:21 -0400 Subject: fixed drag document to another tab to keep the other tab active. changed propertiesVew Backlinks to Links To. Made marker doc text selection names start with "#" --- src/client/views/DocComponent.tsx | 2 +- src/client/views/PropertiesView.tsx | 18 +++++++++--------- .../views/nodes/formattedText/FormattedTextBox.tsx | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx index 2e6ea1faa..73a261c40 100644 --- a/src/client/views/DocComponent.tsx +++ b/src/client/views/DocComponent.tsx @@ -155,7 +155,7 @@ export function ViewBoxAnnotatableComponent

() Doc.AddDocToList(recent, "data", doc, undefined, true, true); } }); - this.props.select(false); + this.isAnyChildContentActive() && this.props.select(false); return true; } } diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 92b52ed5b..8e1e9ea15 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -73,7 +73,7 @@ export class PropertiesView extends React.Component { @observable openFields: boolean = true; @observable openLayout: boolean = false; @observable openContexts: boolean = true; - @observable openBacklinks: boolean = true; + @observable openLinks: boolean = true; @observable openAppearance: boolean = true; @observable openTransform: boolean = true; @observable openFilters: boolean = true; // should be false @@ -282,7 +282,7 @@ export class PropertiesView extends React.Component { return !this.selectedDoc ? (null) : CollectionDockingView.AddSplit(doc, "right")} />; } - @computed get backlinks() { + @computed get links() { return !this.selectedDoc ? (null) : CollectionDockingView.AddSplit(doc, "right")} />; } @@ -1086,17 +1086,17 @@ export class PropertiesView extends React.Component { ; } - @computed get backlinksSubMenu() { + @computed get linksSubMenu() { return

this.openBacklinks = !this.openBacklinks)} - style={{ backgroundColor: this.openBacklinks ? "black" : "" }}> - Backlinks + onPointerDown={action(() => this.openLinks = !this.openLinks)} + style={{ backgroundColor: this.openLinks ? "black" : "" }}> + Linked To
- +
- {this.openBacklinks ?
{this.backlinks}
: null} + {this.openLinks ?
{this.links}
: null}
; } @@ -1353,7 +1353,7 @@ export class PropertiesView extends React.Component { {this.contextsSubMenu} - {this.backlinksSubMenu} + {this.linksSubMenu} {this.inkSubMenu} diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index d8cd8d4c5..c12c4acf0 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -728,7 +728,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp const splitter = state.schema.marks.splitter.create({ id: Utils.GenerateGuid() }); let tr = state.tr.addMark(sel.from, sel.to, splitter); if (sel.from !== sel.to) { - const anchor = anchorDoc ?? Docs.Create.TextanchorDocument({ title: this._editorView?.state.doc.textBetween(sel.from, sel.to), unrendered: true }); + const anchor = anchorDoc ?? Docs.Create.TextanchorDocument({ title: "#" + this._editorView?.state.doc.textBetween(sel.from, sel.to), unrendered: true }); const href = targetHref ?? Doc.localServerPath(anchor); if (anchor !== anchorDoc) this.addDocument(anchor); tr.doc.nodesBetween(sel.from, sel.to, (node: any, pos: number, parent: any) => { -- cgit v1.2.3-70-g09d2