Last active
February 14, 2019 10:50
-
-
Save iamchristough/61fde2fdf277dbd228d851f87ab33136 to your computer and use it in GitHub Desktop.
Map elements and elements default positions to an array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const imgs = [...document.querySelectorAll('.content__img')]; | |
const imgsTotal = imgs.length; | |
let imgTranslations = [...new Array(imgsTotal)].map(() => ({x: 0, y: 0})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment