Fix deckWidth->deckHeight typo

This commit is contained in:
Adam Goldsmith 2017-09-30 17:37:49 -04:00
parent ca33ac3c72
commit b397c08268

View File

@ -224,8 +224,8 @@ function makeCard(cardNum) {
card.style.backgroundPositionX = card.style.backgroundPositionX =
-(cardNum % deckWidth) * parseInt(style.getPropertyValue("width")) + "px"; -(cardNum % deckWidth) * parseInt(style.getPropertyValue("width")) + "px";
card.style.backgroundPositionY = card.style.backgroundPositionY =
-Math.floor(cardNum/deckHeight) * parseInt(style.getPropertyValue("height")) + "px";
card.style.backgroundImage = "url('deck.png')"; card.style.backgroundImage = "url('deck.png')";
-Math.floor(cardNum/deckWidth) * parseInt(style.getPropertyValue("height")) + "px";
card.style.backgroundSize = `${deckWidth * 100}% ${deckHeight * 100}%`; card.style.backgroundSize = `${deckWidth * 100}% ${deckHeight * 100}%`;
document.body.removeChild(card); document.body.removeChild(card);