aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-08-07 21:37:14 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-08-07 21:37:14 -0400
commit35cb61f0d93983464b29152f159d09ea6bd4edf9 (patch)
tree85f9ffadb021d85074b6dd9606a9e7551ece4f19 /src/client/views/MainView.tsx
parent221acd0cfb4831435d1d1b61b86c2cc5e3d3b413 (diff)
Mostly have field level read only working
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 53f589684..7bc31e961 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -422,6 +422,14 @@ export class MainView extends React.Component {
</button>
</div></li>)}
<li key="undoTest"><button className="add-button round-button" title="Click if undo isn't working" onClick={() => UndoManager.TraceOpenBatches()}><FontAwesomeIcon icon="exclamation" size="sm" /></button></li>
+ <li key="test"><button className="add-button round-button" title="asdf" onClick={(() => {
+ let state = DocServer.WriteMode.Always;
+ return () => {
+ state++;
+ state = state % 3;
+ DocServer.setFieldWriteMode("x", state);
+ };
+ })()}><FontAwesomeIcon icon="exclamation" size="sm" /></button></li>
<li key="color"><button className="add-button round-button" title="Select Color" style={{ zIndex: 1000 }} onClick={() => this.toggleColorPicker()}><div className="toolbar-color-button" style={{ backgroundColor: InkingControl.Instance.selectedColor }} >
<div className="toolbar-color-picker" onClick={this.onColorClick} style={this._colorPickerDisplay ? { color: "black", display: "block" } : { color: "black", display: "none" }}>
<SketchPicker color={InkingControl.Instance.selectedColor} onChange={InkingControl.Instance.switchColor} />