aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkMenuItem.tsx
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-07-24 14:04:25 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-07-24 14:04:25 +0800
commit3b5f5875929c2b033dd536c7838606cb91c01a1a (patch)
tree9e24b1cef79d1e60aa7f39a430afbe6bc804d660 /src/client/views/linking/LinkMenuItem.tsx
parent0bdbf8bfbd4c2c2e8e7c1f4e7d530c628ad5e398 (diff)
parentf68b3da6c4d01bf9627723d58a6ce006e360ea30 (diff)
Merge branch 'master' into presentation_updates
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index 0e847632b..d1c839c3b 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -17,6 +17,7 @@ import { DocumentLinksButton } from '../nodes/DocumentLinksButton';
import { LinkDocPreview } from '../nodes/LinkDocPreview';
import { Tooltip } from '@material-ui/core';
import { DocumentType } from '../../documents/DocumentTypes';
+import { undoBatch } from '../../util/UndoManager';
library.add(faEye, faEdit, faTimes, faArrowRight, faChevronDown, faChevronUp, faPencilAlt, faEyeSlash);
@@ -80,10 +81,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
@action toggleShowMore(e: React.PointerEvent) { e.stopPropagation(); this._showMore = !this._showMore; }
onEdit = (e: React.PointerEvent): void => {
-
- console.log("Edit");
LinkManager.currentLink = this.props.linkDoc;
- console.log(this.props.linkDoc);
setupMoveUpEvents(this, e, this.editMoved, emptyFunction, () => this.props.showEditor(this.props.linkDoc));
}
@@ -118,7 +116,6 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
document.addEventListener("pointerup", this.onLinkButtonUp);
if (this._buttonRef && !!!this._buttonRef.current?.contains(e.target as any)) {
- console.log("outside click");
LinkDocPreview.LinkInfo = undefined;
}
}
@@ -152,7 +149,6 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
@action.bound
async followDefault() {
- console.log("FOLLOWWW");
DocumentLinksButton.EditLink = undefined;
LinkDocPreview.LinkInfo = undefined;
@@ -163,10 +159,10 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
}
}
+ @undoBatch
@action
deleteLink = (): void => {
LinkManager.Instance.deleteLink(this.props.linkDoc);
- //this.props.showLinks();
LinkDocPreview.LinkInfo = undefined;
DocumentLinksButton.EditLink = undefined;
}