aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/TooltipTextMenu.tsx
diff options
context:
space:
mode:
authorStanley <syip0810@gmail.com>2019-05-19 14:10:53 -0700
committerStanley <syip0810@gmail.com>2019-05-19 14:10:53 -0700
commiteec769b586d4a1c6e73c4ce4ae78b4b8f2d4762b (patch)
tree7218f2df63e028391e40a084d41bce72fd43e00c /src/client/util/TooltipTextMenu.tsx
parent2cc62cd88688ccdec8275fcaaba939d448f9baf5 (diff)
parent01a223f2e6685506cc1e5db69e9062d5ff0d3246 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into pdf_impl
Diffstat (limited to 'src/client/util/TooltipTextMenu.tsx')
-rw-r--r--src/client/util/TooltipTextMenu.tsx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx
index 6eb654319..4d40d09b2 100644
--- a/src/client/util/TooltipTextMenu.tsx
+++ b/src/client/util/TooltipTextMenu.tsx
@@ -175,7 +175,7 @@ export class TooltipTextMenu {
this.linkText.style.width = "150px";
this.linkText.style.overflow = "hidden";
this.linkText.style.color = "white";
- this.linkText.onpointerdown = (e: PointerEvent) => { e.stopPropagation(); }
+ this.linkText.onpointerdown = (e: PointerEvent) => { e.stopPropagation(); };
let linkBtn = document.createElement("div");
linkBtn.textContent = ">>";
linkBtn.style.width = "20px";
@@ -186,14 +186,14 @@ export class TooltipTextMenu {
let node = this.view.state.selection.$from.nodeAfter;
let link = node && node.marks.find(m => m.type.name === "link");
if (link) {
- console.log("Link to : " + link.attrs.href);
let href: string = link.attrs.href;
if (href.indexOf(DocServer.prepend("/doc/")) === 0) {
let docid = href.replace(DocServer.prepend("/doc/"), "");
DocServer.GetRefField(docid).then(action((f: Opt<Field>) => {
if (f instanceof Doc) {
- if (DocumentManager.Instance.getDocumentView(f))
+ if (DocumentManager.Instance.getDocumentView(f)) {
DocumentManager.Instance.getDocumentView(f)!.props.focus(f);
+ }
else CollectionDockingView.Instance.AddRightSplit(f);
}
}));
@@ -201,7 +201,7 @@ export class TooltipTextMenu {
e.stopPropagation();
e.preventDefault();
}
- }
+ };
this.linkDrag = document.createElement("img");
this.linkDrag.src = "https://seogurusnyc.com/wp-content/uploads/2016/12/link-1.png";
this.linkDrag.style.width = "20px";
@@ -216,12 +216,12 @@ export class TooltipTextMenu {
{
handlers: {
dragComplete: action(() => {
- let m = dragData.droppedDocuments as Doc[];
+ let m = dragData.droppedDocuments;
this.makeLink(DocServer.prepend("/doc/" + m[0][Id]));
}),
},
hideSource: false
- })
+ });
};
this.linkEditor.appendChild(this.linkDrag);
this.linkEditor.appendChild(this.linkText);
@@ -239,7 +239,7 @@ export class TooltipTextMenu {
e.stopPropagation();
e.preventDefault();
}
- }
+ };
this.tooltip.appendChild(this.linkEditor);
}