aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-03-18 16:13:21 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-03-18 16:13:21 -0400
commit9e55d38acc7a6ef1477a81068c5b201f9b13a2e8 (patch)
treed9183437050d26c8db11875a189804e8f8fc7d96
parent66dc0aefa9972071a8d3f5163048867071dd2b59 (diff)
Got rid of some SetOnPrototype
-rw-r--r--src/client/views/InkingControl.tsx2
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/InkingControl.tsx b/src/client/views/InkingControl.tsx
index ad6bbd476..eb2172d03 100644
--- a/src/client/views/InkingControl.tsx
+++ b/src/client/views/InkingControl.tsx
@@ -40,7 +40,7 @@ export class InkingControl extends React.Component {
if (SelectionManager.SelectedDocuments().length == 1) {
var sdoc = SelectionManager.SelectedDocuments()[0];
if (sdoc.props.ContainingCollectionView && sdoc.props.ContainingCollectionView) {
- sdoc.props.Document.SetOnPrototype(KeyStore.BackgroundColor, new TextField(color.hex));
+ sdoc.props.Document.SetDataOnPrototype(KeyStore.BackgroundColor, color.hex, TextField);
}
}
}
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 4bd5726f4..ba9bd9566 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -56,7 +56,7 @@ export class FormattedTextBox extends React.Component<FieldViewProps> {
const state = this._editorView.state.apply(tx);
this._editorView.updateState(state);
const { doc, fieldKey } = this.props;
- doc.SetOnPrototype(fieldKey, new RichTextField(JSON.stringify(state.toJSON())))
+ doc.SetDataOnPrototype(fieldKey, JSON.stringify(state.toJSON()), RichTextField);
// doc.SetData(fieldKey, JSON.stringify(state.toJSON()), RichTextField);
}
}