diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-04-27 22:04:09 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-04-27 22:04:09 -0400 |
commit | 26e683056cddcbe8f90547c77519daa15c37518d (patch) | |
tree | 7b605970f3185701d62b7ddca7604e6638d5bc4a /src/client/util/DashDocCommentView.tsx | |
parent | b783500a62788785bbb67bcfb67b355a80014c67 (diff) |
fixed warnings. fixed DashFieldView
Diffstat (limited to 'src/client/util/DashDocCommentView.tsx')
-rw-r--r-- | src/client/util/DashDocCommentView.tsx | 24 |
1 files changed, 10 insertions, 14 deletions
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<IDashDocCommentView>{ 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<IDashDocCommentView>{ 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<IDashDocCommentView>{ }, 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<IDashDocCommentView>{ > </span > - ) + ); } }
\ No newline at end of file |