From 26e683056cddcbe8f90547c77519daa15c37518d Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Mon, 27 Apr 2020 22:04:09 -0400 Subject: fixed warnings. fixed DashFieldView --- src/client/util/DashDocCommentView.tsx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/client/util/DashDocCommentView.tsx') diff --git a/src/client/util/DashDocCommentView.tsx b/src/client/util/DashDocCommentView.tsx index df5b7e9ff..e716fac53 100644 --- a/src/client/util/DashDocCommentView.tsx +++ b/src/client/util/DashDocCommentView.tsx @@ -24,14 +24,14 @@ import React = require("react"); import { schema } from "./schema_rts"; interface IDashDocCommentView { - node: any, - view: any, - getPos: any + node: any; + view: any; + getPos: any; } export class DashDocCommentView extends React.Component{ constructor(props: IDashDocCommentView) { - super(props) + super(props); } targetNode = () => { // search forward in the prosemirror doc for the attached dashDocNode that is the target of the comment anchor @@ -45,11 +45,9 @@ export class DashDocCommentView extends React.Component{ this.props.view.dispatch(this.props.view.state.tr.insert(this.props.getPos() + 1, dashDoc)); setTimeout(() => { try { this.props.view.dispatch(this.props.view.state.tr.setSelection(TextSelection.create(this.props.view.state.tr.doc, this.props.getPos() + 2))); } catch (e) { } }, 0); return undefined; - }; + } - onPointerDownCollapse = (e: any) => { - e.stopPropagation(); - }; + onPointerDownCollapse = (e: any) => e.stopPropagation(); onPointerUpCollapse = (e: any) => { const target = this.targetNode(); @@ -63,21 +61,19 @@ export class DashDocCommentView extends React.Component{ }, 0); } e.stopPropagation(); - }; + } onPointerEnterCollapse = (e: any) => { DocServer.GetRefField(this.props.node.attrs.docid).then(async dashDoc => dashDoc instanceof Doc && Doc.linkFollowHighlight(dashDoc, false)); e.preventDefault(); e.stopPropagation(); - }; + } onPointerLeaveCollapse = (e: any) => { DocServer.GetRefField(this.props.node.attrs.docid).then(async dashDoc => dashDoc instanceof Doc && Doc.linkFollowUnhighlight()); e.preventDefault(); e.stopPropagation(); - }; - - selectNode() { } + } render() { @@ -94,6 +90,6 @@ export class DashDocCommentView extends React.Component{ > - ) + ); } } \ No newline at end of file -- cgit v1.2.3-70-g09d2