aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DashDocCommentView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-27 22:04:09 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-27 22:04:09 -0400
commit26e683056cddcbe8f90547c77519daa15c37518d (patch)
tree7b605970f3185701d62b7ddca7604e6638d5bc4a /src/client/util/DashDocCommentView.tsx
parentb783500a62788785bbb67bcfb67b355a80014c67 (diff)
fixed warnings. fixed DashFieldView
Diffstat (limited to 'src/client/util/DashDocCommentView.tsx')
-rw-r--r--src/client/util/DashDocCommentView.tsx24
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