diff --git a/etchasketch.js b/etchasketch.js index 9acc3a9..7d6d3d8 100644 --- a/etchasketch.js +++ b/etchasketch.js @@ -3,6 +3,17 @@ const resize = document.querySelector(".resize"); const clear = document.querySelector(".clear"); let dimension = 16; +container.addEventListener('click', (event)=>{ + let target = event.target; + + switch(target){ + case 'resize': + console.log('hidshfjdisafhjkas'); + + } +}) + + resize.addEventListener('click', ()=>{ let newSize = prompt("What size?"); while(container.firstChild){ @@ -12,7 +23,6 @@ resize.addEventListener('click', ()=>{ createGrid(1); } - if (newSize > 0 && newSize < 100){ createGrid(newSize); dimension = newSize; @@ -34,9 +44,6 @@ clear.addEventListener('click', ()=>{ }) - - - function createGrid(dimension){ boxSize = getBoxSize(dimension); diff --git a/styles.css b/styles.css index d0cae75..eda781f 100644 --- a/styles.css +++ b/styles.css @@ -5,7 +5,7 @@ body{ background-color: #545454; margin-right: 0; margin-left: 0; - padding-top: 40px; + padding-top: 20px; } .container{