figbertmath

[RADIOACTIVE] miscellaneous math programs in website form
git clone git://git.figbert.com/figbertmath.git
Log | Files | Refs | README

commit c0b5f7a862ff3ef499a73b725cfd3d7b346c7874
parent 002b63ef7c951f0b5f8e472b901f882319d4c54a
Author: therealFIGBERT <figbertwelner@gmail.com>
Date:   Thu,  5 Dec 2019 19:39:33 -0800

Limit simEQ vars to 5, increase input width, clear output on var change

This five variable limit for the simultaneous equation calculator is due 
to overcrowding in the buttons when more variables are introduced.

Input width was increased to make the input text more readable, as it 
was too small before.

Output is now cleared on matrix size increase created a cleaner 
experience overall.

Diffstat:
Msrc/components/highLevel/simultaneousEquation.js | 4++++
Msrc/components/lowLevel/largeButton/styles.module.css | 5++---
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/components/highLevel/simultaneousEquation.js b/src/components/highLevel/simultaneousEquation.js @@ -81,6 +81,9 @@ export class SimultaneousEquation extends React.Component { newDimension; if (value === 'raise') { newDimension = this.state.dimension + 1; + if (newDimension > 5) { + newDimension = 5; + } } else if (value === 'lower') { newDimension = this.state.dimension - 1; if (newDimension < 2) { @@ -95,6 +98,7 @@ export class SimultaneousEquation extends React.Component { rows.push(numOfVars); } this.setState({ + output: [], dimension: newDimension, coefficients: rows, sums: sums diff --git a/src/components/lowLevel/largeButton/styles.module.css b/src/components/lowLevel/largeButton/styles.module.css @@ -10,7 +10,7 @@ input { } .smallInput { - width: 2vmax; + width: 2.5vmax; } .columnButton { @@ -73,4 +73,4 @@ input { font-family: Tomorrow, -apple-system, sans-serif; border: 0; font-size: 4vmax; -} -\ No newline at end of file +}