aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-04-14 21:44:36 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-04-14 21:44:36 -0400
commita5ae4d9867ed98e0e3ae52dee47596c62e2f74f7 (patch)
tree46bd0ab317c5a61892071071a5ab6889a1a97911 /src/client/views/DocumentDecorations.tsx
parent7b7f1fb2865522da414314afbdb09847e7a9409c (diff)
parentc787b0eac374b4dabf6ede7ee40e77a28815d5c8 (diff)
Merge branch 'master' into interaction_changes
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index a72f02f14..3dbb1cb0f 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -1,24 +1,19 @@
-import { action, computed, observable, trace, runInAction } from "mobx";
+import { action, computed, observable } from "mobx";
import { observer } from "mobx-react";
import { Key } from "../../fields/Key";
-//import ContentEditable from 'react-contenteditable'
import { KeyStore } from "../../fields/KeyStore";
import { ListField } from "../../fields/ListField";
import { NumberField } from "../../fields/NumberField";
-import { Document } from "../../fields/Document";
import { TextField } from "../../fields/TextField";
-import { DragManager, DragLinksAsDocuments } from "../util/DragManager";
+import { emptyFunction } from "../../Utils";
+import { DragLinksAsDocuments, DragManager } from "../util/DragManager";
import { SelectionManager } from "../util/SelectionManager";
-import { CollectionView } from "./collections/CollectionView";
+import { undoBatch } from "../util/UndoManager";
import './DocumentDecorations.scss';
+import { MainOverlayTextBox } from "./MainOverlayTextBox";
import { DocumentView } from "./nodes/DocumentView";
import { LinkMenu } from "./nodes/LinkMenu";
import React = require("react");
-import { FieldWaiting, Field } from "../../fields/Field";
-import { emptyFunction } from "../../Utils";
-import { Main } from "./Main";
-import { undo } from "prosemirror-history";
-import { undoBatch } from "../util/UndoManager";
const higflyout = require("@hig/flyout");
export const { anchorPoints } = higflyout;
export const Flyout = higflyout.default;
@@ -77,14 +72,12 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
if (this._documents.length > 0) {
let field = this._documents[0].props.Document.Get(this._fieldKey);
if (field instanceof TextField) {
- this._documents.forEach(d => {
- d.props.Document.Set(this._fieldKey, new TextField(this._title));
- });
+ this._documents.forEach(d =>
+ d.props.Document.Set(this._fieldKey, new TextField(this._title)));
}
else if (field instanceof NumberField) {
- this._documents.forEach(d => {
- d.props.Document.Set(this._fieldKey, new NumberField(+this._title))
- });
+ this._documents.forEach(d =>
+ d.props.Document.Set(this._fieldKey, new NumberField(+this._title)));
}
this._title = "changed";
}
@@ -317,7 +310,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
break;
}
- Main.Instance.SetTextDoc();
+ MainOverlayTextBox.Instance.SetTextDoc();
SelectionManager.SelectedDocuments().forEach(element => {
const rect = element.screenRect();
if (rect.width !== 0) {