various improvements

This commit is contained in:
Kyle
2020-12-26 10:49:37 -08:00
parent bb8fddcb45
commit 773e6ecddb
6 changed files with 10 additions and 3 deletions

View File

@@ -650,7 +650,7 @@ function writeText(textObject, targetContext) {
currentX = savedTextXPosition;
}
} else if (possibleCode.includes('ptshift')) {
if (card.frames.findIndex(element => element.name.toLowerCase().includes('power/toughness')) >= 0 || card.version.includes('planeswalker') || card.version.includes('commanderLegends')) {
if (card.frames.findIndex(element => element.name.toLowerCase().includes('power/toughness')) >= 0 || card.version.includes('planeswalker') || card.version == 'commanderLegends' || card.version == 'm21') {
ptShift[0] = scaleWidth(parseFloat(possibleCode.replace('ptshift', '').split(',')[0]));
ptShift[1] = scaleHeight(parseFloat(possibleCode.split(',')[1]));
}

View File

@@ -13,7 +13,8 @@ availableFrames = [
{name:'Black Power/Toughness', src:'/img/frames/storybook/storybookPTB.png', bounds:bounds},
{name:'Red Power/Toughness', src:'/img/frames/storybook/storybookPTR.png', bounds:bounds},
{name:'Green Power/Toughness', src:'/img/frames/storybook/storybookPTG.png', bounds:bounds},
{name:'Colorless Power/Toughness', src:'/img/frames/storybook/storybookPTC.png', bounds:bounds}
{name:'Colorless Power/Toughness', src:'/img/frames/storybook/storybookPTC.png', bounds:bounds},
{name:'Holo Stamp', src:'/img/frames/storybook/holo.png', bounds:{x:0.4507, y:0.9129, width:0.0987, height:0.0386}}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false;