diff --git a/JavaScript/assets/js/manipulation.js b/JavaScript/assets/js/manipulation.js index 331cc18..7f69115 100644 --- a/JavaScript/assets/js/manipulation.js +++ b/JavaScript/assets/js/manipulation.js @@ -3,21 +3,21 @@ function setSize(varWidth, varHeight){ let boxHeight = (varHeight / 2); let boxWidth = (varWidth / 2); - if((boxHeight >= 300) && (boxWidth >= 300)) - { - box.style.backgroundColor = 'red'; - }else{ - box.style.backgroundColor = 'yellow'; - } + if((boxHeight >= 300) && (boxWidth >= 300)) + { + box.style.backgroundColor = 'red'; + }else{ + box.style.backgroundColor = 'yellow'; + } box.style.width = boxWidth+'px'; box.style.height = boxHeight+'px'; let textInBox = document.getElementsByClassName('boxTextClass')[0]; - textInBox.style.color = 'blue'; - textInBox.style.margin = '25%'; - textInBox.style.marginLeft = '25%'; + textInBox.style.color = 'blue'; + textInBox.style.margin = '25%'; + textInBox.style.marginLeft = '25%'; } @@ -83,10 +83,11 @@ document.getElementById("startBinCalc").addEventListener('click', function(){ let bin1 = calcDezToBin(dezNumberToBin1); let bin2 = calcDezToBin(dezNumberToBin2); + let numbersForText = fillwithZero(bin1.split(''), bin2.split('')); let result = additionTwoBinNumbers(bin1, bin2); - //let numbersForText = fillwithZero(bin1, bin2); + - document.getElementById('binCalcResult').innerText = bin1 + " + " + bin2 + " = " + result; + document.getElementById('binCalcResult').innerHTML = "