aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/EquationView.tsx
diff options
context:
space:
mode:
authorZachary Zhang <zacharyzhang7@gmail.com>2024-04-02 16:37:22 -0400
committerZachary Zhang <zacharyzhang7@gmail.com>2024-04-02 16:37:22 -0400
commit427406dc60f0f037d69e0992fbb3205476daf89e (patch)
treeb19538c66ade34ab4d2684589dbb8604a613e7ff /src/client/views/nodes/formattedText/EquationView.tsx
parentdc0ee4595e37042db3adf60b002d7baf77cb24ae (diff)
parent3d158bb9b941a3fcb1b486f354ca5c9195dd21c2 (diff)
Merge branch 'master' into zach-starter
Diffstat (limited to 'src/client/views/nodes/formattedText/EquationView.tsx')
-rw-r--r--src/client/views/nodes/formattedText/EquationView.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/nodes/formattedText/EquationView.tsx b/src/client/views/nodes/formattedText/EquationView.tsx
index b786c5ffb..b90653acc 100644
--- a/src/client/views/nodes/formattedText/EquationView.tsx
+++ b/src/client/views/nodes/formattedText/EquationView.tsx
@@ -8,6 +8,7 @@ import { StrCast } from '../../../../fields/Types';
import './DashFieldView.scss';
import EquationEditor from './EquationEditor';
import { FormattedTextBox } from './FormattedTextBox';
+import { DocData } from '../../../../fields/DocSymbols';
export class EquationView {
dom: HTMLDivElement; // container for label and value
@@ -88,7 +89,6 @@ export class EquationViewInternal extends React.Component<IEquationViewInternal>
}
e.stopPropagation();
}}
- onKeyPress={e => e.stopPropagation()}
style={{
position: 'relative',
display: 'inline-block',
@@ -96,12 +96,11 @@ export class EquationViewInternal extends React.Component<IEquationViewInternal>
height: this.props.height,
background: 'white',
borderRadius: '10%',
- bottom: 3,
}}>
<EquationEditor
ref={this._ref}
- value={StrCast(this._textBoxDoc[this._fieldKey], 'y=')}
- onChange={(str: any) => (this._textBoxDoc[this._fieldKey] = str)}
+ value={StrCast(this._textBoxDoc[DocData][this._fieldKey])}
+ onChange={(str: any) => (this._textBoxDoc[DocData][this._fieldKey] = str)}
autoCommands="pi theta sqrt sum prod alpha beta gamma rho"
autoOperatorNames="sin cos tan"
spaceBehavesLikeTab={true}