aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-10-05 13:56:31 -0400
committerbob <bcz@cs.brown.edu>2019-10-05 13:56:31 -0400
commit961cb1566e16edb353975ec436a4445c1cf3db0f (patch)
treef333e7b52dbc999ca11ae63e32ade5f80b846a27 /src/client/util/RichTextSchema.tsx
parent54f2067dbadb66e22249c1572bdc5d6d097f41d1 (diff)
parentf9916faa215297d434aab2357b98d2c4b1fdcb92 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r--src/client/util/RichTextSchema.tsx26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 948a3c5bd..1109fd292 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -654,17 +654,17 @@ export class ImageResizeView {
this._img.onclick = function (e: any) {
e.stopPropagation();
e.preventDefault();
- if (view.state.selection.node && view.state.selection.node.type !== view.state.schema.nodes.image)
- view.dispatch(
- view.state.tr.setSelection(new NodeSelection(view.state.doc.resolve(view.state.selection.from - 2))));
- }
+ if (view.state.selection.node && view.state.selection.node.type !== view.state.schema.nodes.image) {
+ view.dispatch(view.state.tr.setSelection(new NodeSelection(view.state.doc.resolve(view.state.selection.from - 2))));
+ }
+ };
this._img.onpointerdown = function (e: any) {
if (e.ctrlKey) {
e.preventDefault();
e.stopPropagation();
DocServer.GetRefField(node.attrs.docid).then(async linkDoc =>
(linkDoc instanceof Doc) &&
- DocumentManager.Instance.FollowLink(linkDoc, (view.state.schema as any).Document,
+ DocumentManager.Instance.FollowLink(linkDoc, view.state.schema.Document,
document => addDocTab(document, undefined, node.attrs.location ? node.attrs.location : "inTab"), false));
}
};
@@ -730,7 +730,7 @@ export class DashDocView {
this._dashSpan.style.width = node.attrs.width;
this._dashSpan.style.height = node.attrs.height;
this._dashSpan.style.position = "absolute";
- this._dashSpan.style.display = "inline-block"
+ this._dashSpan.style.display = "inline-block";
this._handle.style.position = "absolute";
this._handle.style.width = "20px";
this._handle.style.height = "20px";
@@ -771,16 +771,10 @@ export class DashDocView {
this._dashSpan.onclick = function (e: any) {
FormattedTextBox.firstTarget && FormattedTextBox.firstTarget();
e.stopPropagation();
- }
- this._dashSpan.onkeydown = function (e: any) {
- e.stopPropagation();
- }
- this._dashSpan.onkeypress = function (e: any) {
- e.stopPropagation();
- }
- this._dashSpan.onkeyup = function (e: any) {
- e.stopPropagation();
- }
+ };
+ this._dashSpan.onkeydown = function (e: any) { e.stopPropagation(); };
+ this._dashSpan.onkeypress = function (e: any) { e.stopPropagation(); };
+ this._dashSpan.onkeyup = function (e: any) { e.stopPropagation(); };
this._handle.onpointerdown = function (e: any) {
e.preventDefault();
e.stopPropagation();