diff --git a/public/index.html b/public/index.html index 9f5ba11..bbf1d7e 100644 --- a/public/index.html +++ b/public/index.html @@ -92,9 +92,7 @@ stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> - - - +
diff --git a/src/index.js b/src/index.js index 64e3014..999fc66 100644 --- a/src/index.js +++ b/src/index.js @@ -212,13 +212,6 @@ class Dimensions { // DOCUMENT INTERACTION // ////////////////////////// -const inputDecreaseFloorNum = document.getElementById("decreaseFloorNum"); -inputDecreaseFloorNum.onclick = decreaseFloorNum; - -const inputIncreaseFloorNum = document.getElementById("increaseFloorNum"); -inputIncreaseFloorNum.onclick = increaseFloorNum; - - const inputWidth = document.getElementById("width"); inputWidth.onchange = updateViaManualMeasurements; const inputDepth = document.getElementById("depth"); @@ -228,17 +221,19 @@ inputHeight.onchange = updateViaManualMeasurements; -var labelNumRats = document.getElementById("labelNumRats"); +let labelNumRats = document.getElementById("labelNumRats"); -var ratSlider = document.getElementById("numRats"); +let ratSlider = document.getElementById("numRats"); ratSlider.oninput = function () { update(); } // Full floor functions -var fullFloorNum = document.getElementById("numFullFloors"); - +let fullFloorNum = document.getElementById("numFullFloors"); +fullFloorNum.oninput = function () { + update(); +} function getResultFromChecks(checks) { if (Object.keys(checks).length > 0) { @@ -277,21 +272,3 @@ function update() { resultsDiv.innerHTML = ""; resultsDiv.appendChild(result); } - - -function decreaseFloorNum() { - var input = document.getElementById('numFullFloors'); - var value = parseInt(input.value); - if (value > 0) { - input.value = value - 1; - } - update(); -} - -function increaseFloorNum() { - var input = document.getElementById('numFullFloors'); - var value = parseInt(input.value); - input.value = value + 1; - update(); -} -