diff --git a/js/drag.js b/js/drag.js index 7fdf564..0fa0217 100644 --- a/js/drag.js +++ b/js/drag.js @@ -1,10 +1,6 @@ -const stepSize = 100; +const stepSize = 1; const main = document.querySelector('main'); -for(let guideDraggable of document.querySelectorAll("#page-guide main > *")) { - guideDraggable.classList.add("draggable"); -} - const draggables = document.querySelectorAll(".draggable"); const randomStarts = document.querySelectorAll(".randomStart"); @@ -13,8 +9,8 @@ var zIndex = 2; activateDraggables(); /** - * - * @param {number} n + * + * @param {number} n * @returns {number} */ function stepedSize(n) { @@ -24,8 +20,6 @@ function stepedSize(n) { function move(e) { e.preventDefault(); let target = e.target; - target.style['z-index'] = zIndex; - zIndex++; target.moving = true; @@ -75,6 +69,7 @@ function randomizeDragables() { randY = Math.floor(Math.random() * maxY); randomStart.style.left = randX + "px"; randomStart.style.top = randY + "px"; + randomStart.style.rotate = Math.floor(Math.random() * 61) - 30 + "deg"; } }