aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaafiyan Ahmed <naafiyan@gmail.com>2022-08-19 12:40:05 -0400
committerNaafiyan Ahmed <naafiyan@gmail.com>2022-08-19 12:40:05 -0400
commitda1ea6120ebdd1986eb55a749a95f0397ccc2373 (patch)
tree5dd41cbbc4b7609401bdc0cab46ca431836b43c2
parenta26ee13f1714fa6f6234310558a25ae8b493fa7d (diff)
fixed comment typo
-rw-r--r--src/client/documents/Documents.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index ed3bf6d32..5f416edc0 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -1474,7 +1474,15 @@ export namespace DocUtils {
return created;
}
- export async function DocumentFromType(type: string, path: string, options: DocumentOptions, rootDoc?: Doc): Promise<Opt<Doc>> {
+ /**
+ *
+ * @param type the type of file.
+ * @param path the path to the file.
+ * @param options the document options.
+ * @param overwriteDoc the placeholder loading doc.
+ * @returns
+ */
+ export async function DocumentFromType(type: string, path: string, options: DocumentOptions, overwriteDoc?: Doc): Promise<Opt<Doc>> {
let ctor: ((path: string, options: DocumentOptions, overwriteDoc?: Doc) => Doc | Promise<Doc | undefined>) | undefined = undefined;
if (type.indexOf('image') !== -1) {
ctor = Docs.Create.ImageDocument;
@@ -1524,7 +1532,7 @@ export namespace DocUtils {
options = { ...options, _width: 400, _height: 512, title: path };
}
- return ctor ? ctor(path, options, rootDoc) : undefined;
+ return ctor ? ctor(path, options, overwriteDoc) : undefined;
}
export function addDocumentCreatorMenuItems(docTextAdder: (d: Doc) => void, docAdder: (d: Doc) => void, x: number, y: number, simpleMenu: boolean = false, pivotField?: string, pivotValue?: string): void {