aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentLinksButton.tsx
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-07-22 20:56:22 -0700
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-07-22 20:56:22 -0700
commitefb3fa5fa8081256cfae6ae6cb75b010c560a5e5 (patch)
tree76aad963de3e1928c89df3dccde85d17d48a3e96 /src/client/views/nodes/DocumentLinksButton.tsx
parent5dcc72c2c61e3aafc30b041e312784d881de72d8 (diff)
parentc9703063f1bc4a2007833164bee19c3b0ffb0792 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into new_audio
Diffstat (limited to 'src/client/views/nodes/DocumentLinksButton.tsx')
-rw-r--r--src/client/views/nodes/DocumentLinksButton.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/views/nodes/DocumentLinksButton.tsx b/src/client/views/nodes/DocumentLinksButton.tsx
index bbef48e44..13bec5d7f 100644
--- a/src/client/views/nodes/DocumentLinksButton.tsx
+++ b/src/client/views/nodes/DocumentLinksButton.tsx
@@ -93,9 +93,6 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
if (doubleTap && this.props.InMenu && !!!this.props.StartLink) {
if (DocumentLinksButton.StartLink === this.props.View) {
DocumentLinksButton.StartLink = undefined;
- // action((e: React.PointerEvent<HTMLDivElement>) => {
- // Doc.UnBrushDoc(this.props.View.Document);
- // });
} else {
if (DocumentLinksButton.StartLink && DocumentLinksButton.StartLink !== this.props.View) {
@@ -126,13 +123,13 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
finishLinkClick = (e: React.MouseEvent) => {
if (DocumentLinksButton.StartLink === this.props.View) {
DocumentLinksButton.StartLink = undefined;
- // action((e: React.PointerEvent<HTMLDivElement>) => {
- // Doc.UnBrushDoc(this.props.View.Document);
- // });
} else {
if (this.props.InMenu && !!!this.props.StartLink) {
if (DocumentLinksButton.StartLink && DocumentLinksButton.StartLink !== this.props.View) {
const linkDoc = DocUtils.MakeLink({ doc: DocumentLinksButton.StartLink.props.Document }, { doc: this.props.View.props.Document }, "long drag");
+ // this notifies any of the subviews that a document is made so that they can make finer-grained hyperlinks (). see note above in onLInkButtonMoved
+ runInAction(() => DocumentLinksButton.StartLink!._link = this.props.View._link = linkDoc);
+ setTimeout(action(() => DocumentLinksButton.StartLink!._link = this.props.View._link = undefined), 0);
LinkManager.currentLink = linkDoc;
runInAction(() => {