forked from GithubMirrors/cardconjurer
Restore collector border, only hide for Enchanting Tales
This commit is contained in:
@@ -105,6 +105,7 @@ async function resetCardIrregularities({canvas = [getStandardWidth(), getStandar
|
|||||||
card.bottomInfoRotate = 0;
|
card.bottomInfoRotate = 0;
|
||||||
card.bottomInfoZoom = 1;
|
card.bottomInfoZoom = 1;
|
||||||
replacementMasks = {};
|
replacementMasks = {};
|
||||||
|
card.hideBottomInfoBorder = false;
|
||||||
//rotation
|
//rotation
|
||||||
if (card.landscape) {
|
if (card.landscape) {
|
||||||
// previewContext.scale(card.width/card.height, card.height/card.width);
|
// previewContext.scale(card.width/card.height, card.height/card.width);
|
||||||
@@ -133,22 +134,22 @@ async function resetCardIrregularities({canvas = [getStandardWidth(), getStandar
|
|||||||
async function setBottomInfoStyle() {
|
async function setBottomInfoStyle() {
|
||||||
if (document.querySelector('#enableNewCollectorStyle').checked) {
|
if (document.querySelector('#enableNewCollectorStyle').checked) {
|
||||||
await loadBottomInfo({
|
await loadBottomInfo({
|
||||||
midLeft: {text:'{elemidinfo-set} \u2022 {elemidinfo-language} {savex}{fontbelerenbsc}{fontsize' + scaleHeight(0.001) + '}{upinline' + scaleHeight(0.0005) + '}\uFFEE{savex2}{elemidinfo-artist}', x:0.0647, y:0.9548, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white'},
|
midLeft: {text:'{elemidinfo-set} \u2022 {elemidinfo-language} {savex}{fontbelerenbsc}{fontsize' + scaleHeight(0.001) + '}{upinline' + scaleHeight(0.0005) + '}\uFFEE{savex2}{elemidinfo-artist}', x:0.0647, y:0.9548, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||||
topLeft: {text:'{elemidinfo-rarity} {elemidinfo-number}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white'},
|
topLeft: {text:'{elemidinfo-rarity} {elemidinfo-number}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||||
note: {text:'{loadx}{elemidinfo-note}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white'},
|
note: {text:'{loadx}{elemidinfo-note}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||||
bottomLeft: {text:'NOT FOR SALE', x:0.0647, y:0.9719, width:0.8707, height:0.0143, oneLine:true, font:'gothammedium', size:0.0143, color:'white'},
|
bottomLeft: {text:'NOT FOR SALE', x:0.0647, y:0.9719, width:0.8707, height:0.0143, oneLine:true, font:'gothammedium', size:0.0143, color:'white', outlineWidth:0.003},
|
||||||
wizards: {name:'wizards', text:'{ptshift0,0.0172}\u2122 & \u00a9 {elemidinfo-year} Wizards of the Coast', x:0.0647, y:0.9377, width:0.8707, height:0.0167, oneLine:true, font:'mplantin', size:0.0162, color:'white', align:'right'},
|
wizards: {name:'wizards', text:'{ptshift0,0.0172}\u2122 & \u00a9 {elemidinfo-year} Wizards of the Coast', x:0.0647, y:0.9377, width:0.8707, height:0.0167, oneLine:true, font:'mplantin', size:0.0162, color:'white', align:'right', outlineWidth:0.003},
|
||||||
bottomRight: {text:'{ptshift0,0.0172}CardConjurer.com', x:0.0647, y:0.9548, width:0.8707, height:0.0143, oneLine:true, font:'mplantin', size:0.0143, color:'white', align:'right'}
|
bottomRight: {text:'{ptshift0,0.0172}CardConjurer.com', x:0.0647, y:0.9548, width:0.8707, height:0.0143, oneLine:true, font:'mplantin', size:0.0143, color:'white', align:'right', outlineWidth:0.003}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await loadBottomInfo({
|
await loadBottomInfo({
|
||||||
midLeft: {text:'{elemidinfo-set} \u2022 {elemidinfo-language} {savex}{fontbelerenbsc}{fontsize' + scaleHeight(0.001) + '}{upinline' + scaleHeight(0.0005) + '}\uFFEE{savex2}{elemidinfo-artist}', x:0.0647, y:0.9548, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white'},
|
midLeft: {text:'{elemidinfo-set} \u2022 {elemidinfo-language} {savex}{fontbelerenbsc}{fontsize' + scaleHeight(0.001) + '}{upinline' + scaleHeight(0.0005) + '}\uFFEE{savex2}{elemidinfo-artist}', x:0.0647, y:0.9548, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||||
topLeft: {text:'{elemidinfo-number}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white'},
|
topLeft: {text:'{elemidinfo-number}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||||
note: {text:'{loadx2}{elemidinfo-note}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white'},
|
note: {text:'{loadx2}{elemidinfo-note}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||||
rarity: {text:'{loadx}{elemidinfo-rarity}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white'},
|
rarity: {text:'{loadx}{elemidinfo-rarity}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||||
bottomLeft: {text:'NOT FOR SALE', x:0.0647, y:0.9719, width:0.8707, height:0.0143, oneLine:true, font:'gothammedium', size:0.0143, color:'white'},
|
bottomLeft: {text:'NOT FOR SALE', x:0.0647, y:0.9719, width:0.8707, height:0.0143, oneLine:true, font:'gothammedium', size:0.0143, color:'white', outlineWidth:0.003},
|
||||||
wizards: {name:'wizards', text:'{ptshift0,0.0172}\u2122 & \u00a9 {elemidinfo-year} Wizards of the Coast', x:0.0647, y:0.9377, width:0.8707, height:0.0167, oneLine:true, font:'mplantin', size:0.0162, color:'white', align:'right'},
|
wizards: {name:'wizards', text:'{ptshift0,0.0172}\u2122 & \u00a9 {elemidinfo-year} Wizards of the Coast', x:0.0647, y:0.9377, width:0.8707, height:0.0167, oneLine:true, font:'mplantin', size:0.0162, color:'white', align:'right', outlineWidth:0.003},
|
||||||
bottomRight: {text:'{ptshift0,0.0172}CardConjurer.com', x:0.0647, y:0.9548, width:0.8707, height:0.0143, oneLine:true, font:'mplantin', size:0.0143, color:'white', align:'right'}
|
bottomRight: {text:'{ptshift0,0.0172}CardConjurer.com', x:0.0647, y:0.9548, width:0.8707, height:0.0143, oneLine:true, font:'mplantin', size:0.0143, color:'white', align:'right', outlineWidth:0.003}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2868,6 +2869,11 @@ function writeText(textObject, targetContext) {
|
|||||||
lineContext.shadowBlur = textShadowBlur;
|
lineContext.shadowBlur = textShadowBlur;
|
||||||
lineContext.strokeStyle = textObject.outlineColor || 'black';
|
lineContext.strokeStyle = textObject.outlineColor || 'black';
|
||||||
var textOutlineWidth = scaleHeight(textObject.outlineWidth) || 0;
|
var textOutlineWidth = scaleHeight(textObject.outlineWidth) || 0;
|
||||||
|
|
||||||
|
var hideBottomInfoBorder = card.hideBottomInfoBorder || false;
|
||||||
|
if (hideBottomInfoBorder && ['midLeft', 'topLeft', 'note', 'bottomLeft', 'wizards', 'bottomRight'].includes(textObject.name)) {
|
||||||
|
textOutlineWidth = 0;
|
||||||
|
}
|
||||||
lineContext.lineWidth = textOutlineWidth;
|
lineContext.lineWidth = textOutlineWidth;
|
||||||
//Begin looping through words/codes
|
//Begin looping through words/codes
|
||||||
innerloop: for (word of splitText) {
|
innerloop: for (word of splitText) {
|
||||||
@@ -3775,6 +3781,7 @@ async function bottomInfoEdited() {
|
|||||||
if (["NOT FOR SALE", "Wizards of the Coast", "CardConjurer.com", "cardconjurer.com"].some(v => textObject[1].text.includes(v))) {
|
if (["NOT FOR SALE", "Wizards of the Coast", "CardConjurer.com", "cardconjurer.com"].some(v => textObject[1].text.includes(v))) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
textObject[1].name = textObject[0];
|
||||||
await writeText(textObject[1], bottomInfoContext);
|
await writeText(textObject[1], bottomInfoContext);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
@@ -19,6 +19,7 @@ document.querySelector('#loadFrameVersion').onclick = async function() {
|
|||||||
await resetCardIrregularities();
|
await resetCardIrregularities();
|
||||||
//sets card version
|
//sets card version
|
||||||
card.version = 'enchantingTales';
|
card.version = 'enchantingTales';
|
||||||
|
card.hideBottomInfoBorder = true;
|
||||||
//art bounds
|
//art bounds
|
||||||
card.artBounds = {x:0, y:111/2100, width:1, height:1821/2100};
|
card.artBounds = {x:0, y:111/2100, width:1, height:1821/2100};
|
||||||
autoFitArt();
|
autoFitArt();
|
||||||
|
Reference in New Issue
Block a user