aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/WebBox.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-09-18 09:26:31 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-09-18 09:26:31 +0530
commitc322504b7160d39a4da7ff40f5c67023be1bf6ed (patch)
tree43dffa00be1d78a91342233b23a109a404a88c9a /src/client/views/nodes/WebBox.tsx
parent5639cf97dbeff337e9661c874da4e46b9ed1a0b4 (diff)
parent88fbc391b3dd3f36a2e7015bc59c3a306d3e7d57 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r--src/client/views/nodes/WebBox.tsx11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx
index 41622dbc9..dac6d3bf8 100644
--- a/src/client/views/nodes/WebBox.tsx
+++ b/src/client/views/nodes/WebBox.tsx
@@ -32,6 +32,7 @@ import "./WebBox.scss";
import "../pdf/PDFViewer.scss";
import React = require("react");
import { Tooltip } from '@material-ui/core';
+import { CurrentUserUtils } from '../../util/CurrentUserUtils';
const htmlToText = require("html-to-text");
type WebDocument = makeInterface<[typeof documentSchema]>;
@@ -498,15 +499,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum
e.preventDefault();
e.stopPropagation();
- const clipDoc = Doc.MakeAlias(this.dataDoc);
- clipDoc._fitWidth = true;
- clipDoc._width = this.marqueeWidth();
- clipDoc._height = this.marqueeHeight();
- clipDoc._scrollTop = this.marqueeY();
- const targetDoc = Docs.Create.TextDocument("", { _width: 125, _height: 125, title: "Note linked to " + this.props.Document.title });
- Doc.GetProto(targetDoc).data = new List<Doc>([clipDoc]);
- clipDoc.rootDocument = targetDoc;
- targetDoc.layoutKey = "layout";
+ const targetDoc = CurrentUserUtils.GetNewTextDoc("Note linked to " + this.props.Document.title, 0, 0, 125, 125);
const annotationDoc = this.highlight("rgba(173, 216, 230, 0.35)"); // hyperlink color
if (annotationDoc) {
DragManager.StartPdfAnnoDrag([ele], new DragManager.PdfAnnoDragData(this.props.Document, annotationDoc, targetDoc), e.pageX, e.pageY, {