Update packMargin.js

This commit is contained in:
Kyle
2021-01-14 09:10:05 -08:00
parent b8ab062c97
commit b58bbebd08

View File

@@ -16,21 +16,28 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
// card.version = 'margin'; // card.version = 'margin';
card.margins = true; card.margins = true;
//art stuff //art stuff
var changedArtBounds = false;
if (card.artBounds.width == 1) { if (card.artBounds.width == 1) {
card.artBounds.width += 0.044; card.artBounds.width += 0.044;
changedArtBounds = true;
} }
if (card.artBounds.x == 0) { if (card.artBounds.x == 0) {
card.artBounds.x = -0.044; card.artBounds.x = -0.044;
card.artBounds.width += 0.044; card.artBounds.width += 0.044;
changedArtBounds = true;
} }
if (card.artBounds.height == 1) { if (card.artBounds.height == 1) {
card.artBounds.height += 1/35; card.artBounds.height += 1/35;
changedArtBounds = true;
} }
if (card.artBounds.y == 0) { if (card.artBounds.y == 0) {
card.artBounds.y = -1/35; card.artBounds.y = -1/35;
card.artBounds.height += 1/35; card.artBounds.height += 1/35;
changedArtBounds = true;
}
if (changedArtBounds) {
autoFitArt();
} }
autoFitArt();
//runs anything that needs to run //runs anything that needs to run
drawTextBuffer(); drawTextBuffer();
drawFrames(); drawFrames();