aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonikahedman <monika_hedman@brown.edu>2019-08-22 12:08:12 -0400
committermonikahedman <monika_hedman@brown.edu>2019-08-22 12:08:12 -0400
commitf0f0cc36654183921076db5a341fe7cac2bfdd3c (patch)
tree7f11d93e77125f0f7ecef238a1b2ea02fb439448
parent135da417387b5fef28df8f07266d404be8211320 (diff)
cleaned up
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx1
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx9
2 files changed, 1 insertions, 9 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index e70d526c5..27eafd769 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -203,7 +203,6 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
onClick = (e: React.MouseEvent): void => {
if (Math.abs(e.clientX - this._downX) < Utils.DRAG_THRESHOLD &&
Math.abs(e.clientY - this._downY) < Utils.DRAG_THRESHOLD) {
- //this is probably the wrong transform
PreviewCursor.Show(e.clientX, e.clientY, this.onKeyPress, this.props.addLiveTextDocument, this.props.getTransform, this.props.addDocument);
// let the DocumentView stopPropagation of this event when it selects this document
} else { // why do we get a click event when the cursor have moved a big distance?
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 0c0ab4d87..1db66d4a0 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -145,7 +145,7 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
paste = (e: ClipboardEvent) => {
- //this is throwing a ton of erros so i had to comment it out
+ //this is throwing a ton of errors so commented it out
if (e.clipboardData && this._editorView) {
// let pdfPasteText = `${Utils.GenerateDeterministicGuid("pdf paste")}`;
// for (let i = 0; i < e.clipboardData.items.length; i++) {
@@ -173,13 +173,6 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
}
}
- public setText = (text: string) => {
- const tx = this._editorView!.state.tr.insertText(text);
- const state = this._editorView!.state;
- this._editorView!.dispatch(tx);
- return new RichTextField(JSON.stringify(state.toJSON()));
- }
-
dispatchTransaction = (tx: Transaction) => {
if (this._editorView) {
const state = this._editorView.state.apply(tx);