From 3afdfa11e35bcb73dd4a871e5e4489b0dd3a3c95 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Tue, 16 Jun 2020 21:16:54 -0400 Subject: fixed problems with scriptingBox types & cleaned up code. --- .../nodes/formattedText/DashDocCommentView.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/client/views/nodes/formattedText/DashDocCommentView.tsx') diff --git a/src/client/views/nodes/formattedText/DashDocCommentView.tsx b/src/client/views/nodes/formattedText/DashDocCommentView.tsx index ad204f3df..5c75a589a 100644 --- a/src/client/views/nodes/formattedText/DashDocCommentView.tsx +++ b/src/client/views/nodes/formattedText/DashDocCommentView.tsx @@ -43,24 +43,24 @@ interface IDashDocCommentViewInternal { export class DashDocCommentViewInternal extends React.Component{ constructor(props: IDashDocCommentViewInternal) { - super(props) - this.onPointerLeaveCollapsed = this.onPointerLeaveCollapsed.bind(this) - this.onPointerEnterCollapsed = this.onPointerEnterCollapsed.bind(this) - this.onPointerUpCollapsed = this.onPointerUpCollapsed.bind(this) - this.onPointerDownCollapsed = this.onPointerDownCollapsed.bind(this) + super(props); + this.onPointerLeaveCollapsed = this.onPointerLeaveCollapsed.bind(this); + this.onPointerEnterCollapsed = this.onPointerEnterCollapsed.bind(this); + this.onPointerUpCollapsed = this.onPointerUpCollapsed.bind(this); + this.onPointerDownCollapsed = this.onPointerDownCollapsed.bind(this); } onPointerLeaveCollapsed(e: any) { DocServer.GetRefField(this.props.docid).then(async dashDoc => dashDoc instanceof Doc && Doc.linkFollowUnhighlight()); e.preventDefault(); e.stopPropagation(); - }; + } onPointerEnterCollapsed(e: any) { DocServer.GetRefField(this.props.docid).then(async dashDoc => dashDoc instanceof Doc && Doc.linkFollowHighlight(dashDoc, false)); e.preventDefault(); e.stopPropagation(); - }; + } onPointerUpCollapsed(e: any) { const target = this.targetNode(); @@ -75,11 +75,11 @@ export class DashDocCommentViewInternal extends React.Component { // search forward in the prosemirror doc for the attached dashDocNode that is the target of the comment anchor const state = this.props.view.state; @@ -94,7 +94,7 @@ export class DashDocCommentViewInternal extends React.Component { try { this.props.view.dispatch(state.tr.setSelection(TextSelection.create(state.tr.doc, this.props.getPos() + 2))); } catch (e) { } }, 0); return undefined; - }; + } render() { return ( @@ -107,6 +107,6 @@ export class DashDocCommentViewInternal extends React.Component - ) + ); } } -- cgit v1.2.3-70-g09d2