aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-03-30 09:11:21 -0400
committerbobzel <zzzman@gmail.com>2022-03-30 09:11:21 -0400
commit24c4443cc097694a12c26b1e5aa1c7a7930625c1 (patch)
tree09c77fda35d54b3c3adb336dfdfc4ff36779dec7 /src
parentcc4a500d6d3c941d139e6c07dbf76c4eed9c3280 (diff)
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 "#"
Diffstat (limited to 'src')
-rw-r--r--src/client/views/DocComponent.tsx2
-rw-r--r--src/client/views/PropertiesView.tsx18
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBox.tsx2
3 files changed, 11 insertions, 11 deletions
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<P extends ViewBoxAnnotatableProps>()
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<PropertiesViewProps> {
@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<PropertiesViewProps> {
return !this.selectedDoc ? (null) : <PropertiesDocContextSelector Document={this.selectedDoc} hideTitle={true} addDocTab={(doc, where) => CollectionDockingView.AddSplit(doc, "right")} />;
}
- @computed get backlinks() {
+ @computed get links() {
return !this.selectedDoc ? (null) : <PropertiesDocBacklinksSelector Document={this.selectedDoc} hideTitle={true} addDocTab={(doc, where) => CollectionDockingView.AddSplit(doc, "right")} />;
}
@@ -1086,17 +1086,17 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>;
}
- @computed get backlinksSubMenu() {
+ @computed get linksSubMenu() {
return <div className="propertiesView-contexts">
<div className="propertiesView-contexts-title"
- onPointerDown={action(() => this.openBacklinks = !this.openBacklinks)}
- style={{ backgroundColor: this.openBacklinks ? "black" : "" }}>
- Backlinks
+ onPointerDown={action(() => this.openLinks = !this.openLinks)}
+ style={{ backgroundColor: this.openLinks ? "black" : "" }}>
+ Linked To
<div className="propertiesView-contexts-title-icon">
- <FontAwesomeIcon icon={this.openBacklinks ? "caret-down" : "caret-right"} size="lg" color="white" />
+ <FontAwesomeIcon icon={this.openLinks ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
- {this.openBacklinks ? <div className="propertiesView-contexts-content" >{this.backlinks}</div> : null}
+ {this.openLinks ? <div className="propertiesView-contexts-content" >{this.links}</div> : null}
</div>;
}
@@ -1353,7 +1353,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
{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) => {