diff --git a/package-lock.json b/package-lock.json index 44eeb8c..bcfd993 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index dc36c02..0daaca4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dice", - "version": "1.0.15", + "version": "1.0.16", "description": "Calculates the probability of rolling a value given a combination of dice.", "author": "F.W. Dekker", "browser": "dist/bundle.js", @@ -16,18 +16,18 @@ "deploy": "grunt deploy" }, "dependencies": { - "chart.js": "^3.2.0" + "chart.js": "^3.6.0" }, "devDependencies": { - "grunt": "^1.4.0", - "grunt-cli": "^1.4.2", + "grunt": "^1.4.1", + "grunt-cli": "^1.4.3", "grunt-contrib-clean": "^2.0.0", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-watch": "^1.1.0", "grunt-focus": "^1.0.0", "grunt-text-replace": "^0.4.0", - "grunt-webpack": "^4.0.3", - "webpack": "^5.36.0", - "webpack-cli": "^4.6.0" + "grunt-webpack": "^5.0.0", + "webpack": "^5.64.0", + "webpack-cli": "^4.9.1" } } diff --git a/src/main/js/main.js b/src/main/js/main.js index b187ff7..91ef3cf 100644 --- a/src/main/js/main.js +++ b/src/main/js/main.js @@ -98,7 +98,6 @@ inputTable.addDieRow = () => { if (e.key === "Enter") outputChart.updateProbGraph(); }); - input.focus(); return input; }; @@ -122,6 +121,8 @@ inputTable.addDieRow = () => { row.insertCell().appendChild(createNumberInput(newIndex, "dieEyes", 6)); row.insertCell().appendChild(createNumberInput(newIndex, "dieCount", 2)); row.insertCell().appendChild(createRemoveLink(newIndex, "dieRemove")); + + $("#dieEyes" + newIndex).focus(); }; inputTable.removeDieRow = index => { @@ -152,7 +153,7 @@ inputTable.getDice = () => { doAfterLoad(() => { const button = $("#addDieRowButton"); button.onclick = inputTable.addDieRow; - button.click() + button.click(); }); @@ -215,17 +216,7 @@ doAfterLoad(() => { probChart = new Chart($("#probChart").getContext("2d"), { type: "line", data: {}, - options: { - fill: true, - scales: { - yAxes: [{ - display: true, - ticks: { - suggestedMin: 0 - } - }] - } - } + options: {fill: true}, }); const submit = $("#submit");