aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-06-25 20:18:14 -0400
committerFawn <fangrui_tong@brown.edu>2019-06-25 20:18:14 -0400
commit2d300b0cd3d02c900865c61eacd539efed5289e6 (patch)
tree8a71792efda43c0ee4c37f716bae7f2bb63a2c95 /src/client/documents/Documents.ts
parent2a698e88da5ef0a9fee1ff4ee69746f1242798c9 (diff)
fixed link metadata rendering bug
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index d2300e4d2..547687921 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -88,7 +88,7 @@ export namespace DocUtils {
// let protoTarg = target.proto ? target.proto : target;
export function MakeLink(source: Doc, target: Doc, targetContext?: Doc, title: string = "", description: string = "", tags: string = "Default") {
if (LinkManager.Instance.doesLinkExist(source, target)) {
- console.log("LINK EXISTS"); return;
+ return;
}
UndoManager.RunInBatch(() => {
@@ -186,11 +186,6 @@ export namespace Docs {
{ x: 0, y: 0, width: Number(MINIMIZED_ICON_SIZE), height: Number(MINIMIZED_ICON_SIZE) });
return iconProto;
}
- // function CreateLinkPrototype(): Doc {
- // let linkProto = setupPrototypeOptions(linkProtoId, "LINK_PROTO", LinkButtonBox.LayoutString(),
- // { x: 0, y: 0, width: 300 });
- // return linkProto;
- // }
function CreateTextPrototype(): Doc {
let textProto = setupPrototypeOptions(textProtoId, "TEXT_PROTO", FormattedTextBox.LayoutString(),
{ x: 0, y: 0, width: 300, backgroundColor: "#f1efeb" });
@@ -277,9 +272,7 @@ export namespace Docs {
export function IconDocument(icon: string, options: DocumentOptions = {}) {
return CreateInstance(iconProto, new IconField(icon), options);
}
- // export function LinkButtonDocument(data: LinkButtonData, options: DocumentOptions = {}) {
- // return CreateInstance(linkProto, new LinkButtonField(data), options);
- // }
+
export function PdfDocument(url: string, options: DocumentOptions = {}) {
return CreateInstance(pdfProto, new PdfField(new URL(url)), options);
}