aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentLinksButton.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-07-30 23:29:49 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-07-30 23:29:49 +0530
commitb3762dd0626712b9801fc8751ceb8bafc1229b16 (patch)
treee56ed4cb5b4165f9a5d83289f1f8627557fd71b5 /src/client/views/nodes/DocumentLinksButton.tsx
parenta61c116e9028c2778b5c48cd596f9cb00d80d0f6 (diff)
parentd6aaa436f3f733166c48a1fa38ca6946f30f0bd7 (diff)
Merge branch 'menu_restructure' of https://github.com/browngraphicslab/Dash-Web into menu_restructure
Diffstat (limited to 'src/client/views/nodes/DocumentLinksButton.tsx')
-rw-r--r--src/client/views/nodes/DocumentLinksButton.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/views/nodes/DocumentLinksButton.tsx b/src/client/views/nodes/DocumentLinksButton.tsx
index 5f3a6e78d..198a90225 100644
--- a/src/client/views/nodes/DocumentLinksButton.tsx
+++ b/src/client/views/nodes/DocumentLinksButton.tsx
@@ -120,7 +120,7 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
}
@action @undoBatch
- finishLinkClick = (e: React.MouseEvent) => {
+ finishLinkClick = (screenX: number, screenY: number) => {
if (DocumentLinksButton.StartLink === this.props.View) {
DocumentLinksButton.StartLink = undefined;
} else {
@@ -135,13 +135,13 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
runInAction(() => {
if (linkDoc) {
TaskCompletionBox.textDisplayed = "Link Created";
- TaskCompletionBox.popupX = e.screenX;
- TaskCompletionBox.popupY = e.screenY - 133;
+ TaskCompletionBox.popupX = screenX;
+ TaskCompletionBox.popupY = screenY - 133;
TaskCompletionBox.taskCompleted = true;
if (LinkDescriptionPopup.showDescriptions === "ON" || !LinkDescriptionPopup.showDescriptions) {
- LinkDescriptionPopup.popupX = e.screenX;
- LinkDescriptionPopup.popupY = e.screenY - 100;
+ LinkDescriptionPopup.popupX = screenX;
+ LinkDescriptionPopup.popupY = screenY - 100;
LinkDescriptionPopup.descriptionPopup = true;
}
@@ -207,7 +207,7 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
</div>
{DocumentLinksButton.StartLink && this.props.InMenu && !!!this.props.StartLink && DocumentLinksButton.StartLink !== this.props.View ? <div className={"documentLinksButton-endLink"}
style={{ width: this.props.InMenu ? "20px" : "30px", height: this.props.InMenu ? "20px" : "30px" }}
- onPointerDown={this.completeLink} onClick={e => this.finishLinkClick(e)} /> : (null)}
+ onPointerDown={this.completeLink} onClick={e => this.finishLinkClick(e.screenX, e.screenY)} /> : (null)}
{DocumentLinksButton.StartLink === this.props.View && this.props.InMenu && this.props.StartLink ? <div className={"documentLinksButton-startLink"}
style={{ width: this.props.InMenu ? "20px" : "30px", height: this.props.InMenu ? "20px" : "30px" }} /> : (null)}
</div>;