mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-26 21:04:58 -05:00
Update packMargin.js
This commit is contained in:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user