Skip to content

Commit 426627f

Browse files
Added min attribute for input numbers
1 parent 90aa935 commit 426627f

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

pages/common.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function preload() {
2727
if (par != null) {
2828
let inp = createInput();
2929
inp.attribute('type', 'number');
30+
inp.attribute('min', '0');
3031
inp.parent(par);
3132
inp.changed(updateResults);
3233
dim[e] = inp;
@@ -37,6 +38,7 @@ function preload() {
3738
if (par != null) {
3839
let inp = createInput();
3940
inp.attribute('type', 'number');
41+
inp.attribute('min', '0');
4042
inp.parent(par);
4143
inp.changed(updateResults);
4244
mat[e] = inp;
@@ -55,11 +57,6 @@ function preload() {
5557
Wb: document.getElementById('resistanceB'),
5658
F: document.getElementById('traction')
5759
}
58-
// for (let p in res) {
59-
// if (res[p] == null) {
60-
// delete res[p];
61-
// }
62-
// }
6360
}
6461

6562
function setup() {

0 commit comments

Comments
 (0)