diff options
author | tschicke-brown <tyler_schicke@brown.edu> | 2019-06-17 14:05:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-17 14:05:07 -0400 |
commit | 62e7e21d6db96a9c62710c2bc6842705b79f5665 (patch) | |
tree | 78beb9e04812294b1c71307b69b2a1d721e9a5fc /src/client/documents/Documents.ts | |
parent | 589d2409cf00c3ff15eddbe88835a63a09785f2c (diff) | |
parent | 37e1c3895af6666bbd4c253fb7af51495ec48706 (diff) |
Merge pull request #160 from browngraphicslab/pdf_impl
PDF stuff!
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index b1df89dbd..91d3707f6 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -69,15 +69,15 @@ export interface DocumentOptions { const delegateKeys = ["x", "y", "width", "height", "panX", "panY"]; export namespace DocUtils { - export function MakeLink(source: Doc, target: Doc, targetContext?: Doc) { + export function MakeLink(source: Doc, target: Doc, targetContext?: Doc, title: string = "", description: string = "", tags: string = "Default") { let protoSrc = source.proto ? source.proto : source; let protoTarg = target.proto ? target.proto : target; UndoManager.RunInBatch(() => { let linkDoc = Docs.TextDocument({ width: 100, height: 30, borderRounding: -1 }); let linkDocProto = Doc.GetProto(linkDoc); - linkDocProto.title = source.title + " to " + target.title; - linkDocProto.linkDescription = ""; - linkDocProto.linkTags = "Default"; + linkDocProto.title = title === "" ? source.title + " to " + target.title : title; + linkDocProto.linkDescription = description; + linkDocProto.linkTags = tags; linkDocProto.linkedTo = target; linkDocProto.linkedFrom = source; @@ -171,7 +171,7 @@ export namespace Docs { } function CreatePdfPrototype(): Doc { let pdfProto = setupPrototypeOptions(pdfProtoId, "PDF_PROTO", CollectionPDFView.LayoutString("annotations"), - { x: 0, y: 0, nativeWidth: 1200, width: 300, backgroundLayout: PDFBox.LayoutString(), curPage: 1 }); + { x: 0, y: 0, width: 300, height: 300, backgroundLayout: PDFBox.LayoutString(), curPage: 1 }); return pdfProto; } function CreateWebPrototype(): Doc { |