aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authoraaravkumar <aarav.kumar1510@gmail.com>2025-04-28 19:24:56 -0400
committeraaravkumar <aarav.kumar1510@gmail.com>2025-04-28 19:24:56 -0400
commite59643a3346db0429dd2936ad8d7430401e658be (patch)
treef2db3b3bddcf9f253c578ebd2cefffdba884e128 /src/client/documents/Documents.ts
parent27f4f85a49f3aaf31e8ff1f2c8aa9d5020eee6ac (diff)
added task nodes styling, completion, and removal of start/end times upon all-day click
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 1b0c422da..9b1f64a36 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -969,6 +969,24 @@ export namespace Docs {
);
}
+ export function LinkDocument(source: Doc, target: Doc, options: DocumentOptions = {}, id?: string) {
+ const linkDoc = InstanceFromProto(
+ Prototypes.get(DocumentType.LINK),
+ undefined,
+ {
+ link_anchor_1: source,
+ link_anchor_2: target,
+ ...options,
+ },
+ id,
+ 'link'
+ );
+
+ Doc.AddLink(linkDoc);
+
+ return linkDoc;
+ }
+
export function InkDocument(points: PointData[], options: DocumentOptions = {}, strokeWidth: number, color: string, strokeBezier: string, fillColor: string, arrowStart: string, arrowEnd: string, dash: string, isInkMask: boolean) {
const ink = InstanceFromProto(Prototypes.get(DocumentType.INK), '', { title: 'ink', ...options });
ink.$color = color;