aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-29 11:31:41 -0400
committerbobzel <zzzman@gmail.com>2020-09-29 11:31:41 -0400
commit60c930b0850f87a88f032ddc7029fa4586251ae8 (patch)
tree933f1f4ed7457a15f06e74bbf49aa6fcb5c812ec /src/client/documents/Documents.ts
parent6d296b0904b3c93b111f96594a3f54c82c8c7bf0 (diff)
fixed highlighting of link hypertext anchors (was offset very wrongly before). fixed setting link mark correctly when linking two hypertext anchors. fixed allowing link to parent collection when parent collection is specified by clicking its link button
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 1d7e4f386..19f719c43 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -977,9 +977,9 @@ export namespace DocUtils {
DocUtils.ActiveRecordings.map(d => DocUtils.MakeLink({ doc: doc }, { doc: d }, "audio link", "audio timeline"));
}
- export function MakeLink(source: { doc: Doc }, target: { doc: Doc }, linkRelationship: string = "", description: string = "", id?: string) {
+ export function MakeLink(source: { doc: Doc }, target: { doc: Doc }, linkRelationship: string = "", description: string = "", id?: string, allowParCollectionLink?: boolean) {
const sv = DocumentManager.Instance.getDocumentView(source.doc);
- if (sv && sv.props.ContainingCollectionDoc === target.doc) return;
+ if (!allowParCollectionLink && sv?.props.ContainingCollectionDoc === target.doc) return;
if (target.doc === Doc.UserDoc()) return undefined;
const linkDoc = Docs.Create.LinkDocument(source, target, { linkRelationship, layoutKey: "layout_linkView", description }, id);