Playfield: Allow decks with spaces in name

This commit is contained in:
Adam Goldsmith 2017-10-12 03:16:10 -04:00
parent b435916f32
commit 7ddb8290b0

View File

@ -230,7 +230,8 @@ function makeCard(cardNum) {
-(cardNum % deckWidth) * parseInt(style.getPropertyValue("width")) + "px";
card.style.backgroundPositionY =
-Math.floor(cardNum/deckWidth) * parseInt(style.getPropertyValue("height")) + "px";
card.style.backgroundImage = `url(${deckJSON.CustomDeck[deckNum].FaceURL})`;
let faceURI = encodeURI(deckJSON.CustomDeck[deckNum].FaceURL);
card.style.backgroundImage = `url(${faceURI})`;
card.style.backgroundSize = `${deckWidth * 100}% ${deckHeight * 100}%`;
document.body.removeChild(card);