Updates
This commit is contained in:
parent
989b83168b
commit
8bf8485c39
3 changed files with 7 additions and 7 deletions
|
@ -841,7 +841,7 @@ generation methods.
|
|||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Sat Oct 08 2022 23:48:47 GMT+0000 (Coordinated Universal Time)
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Mon Oct 17 2022 21:53:50 GMT+0000 (Coordinated Universal Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
|
@ -359,7 +359,7 @@ class CardCreator {
|
|||
const customImagePromise = customImage != null ? loadImage(customImage) : Promise.resolve();
|
||||
const portraitPromise = dataPromise.then(data => loadImage(data.Character.Portrait));
|
||||
const deityPromise = dataPromise.then(data => loadImage(`https://xivapi.com/${data.Character.GuardianDeity.Icon}`));
|
||||
const gcRankPromise = dataPromise.then(data => data.Character.GrandCompany.Company != null ? loadImage(`https://xivapi.com/${data.Character.GrandCompany.Rank.Icon}`) : null);
|
||||
const gcRankPromise = dataPromise.then(data => data.Character.GrandCompany.Company != null && data.Character.GrandCompany.Company.Name != null ? loadImage(`https://xivapi.com/${data.Character.GrandCompany.Rank.Icon}`) : null);
|
||||
const fcCrestPromise = dataPromise.then(data => data.Character.FreeCompanyName != null ? this.createCrest(data.FreeCompany.Crest) : null);
|
||||
|
||||
// Build canvas and only await data, when actually needed
|
||||
|
@ -470,10 +470,10 @@ class CardCreator {
|
|||
let minionsPercentage = "N/A"
|
||||
let mountsPercentage = "N/A"
|
||||
if (Minions != null) {
|
||||
const minionsPercentage = Math.ceil(((Minions.length ?? 0) / this.minionCount) * 100);
|
||||
minionsPercentage = Math.ceil(((Minions.length ?? 0) / this.minionCount) * 100);
|
||||
}
|
||||
if (Mounts != null) {
|
||||
const mountsPercentage = Math.ceil(((Mounts.length ?? 0) / this.mountCount) * 100);
|
||||
mountsPercentage = Math.ceil(((Mounts.length ?? 0) / this.mountCount) * 100);
|
||||
}
|
||||
|
||||
ctx.font = smed;
|
||||
|
@ -497,7 +497,7 @@ class CardCreator {
|
|||
ctx.fillText(`${Character.Race.Name}, ${Character.Tribe.Name}`, 480, infoTextBigStartY); // Race & Clan
|
||||
ctx.fillText(Character.GuardianDeity.Name, 480, infoTextBigStartY + infoTextSpacing); // Guardian
|
||||
|
||||
if (Character.GrandCompany.Company != null) {
|
||||
if (Character.GrandCompany.Company != null && Character.GrandCompany.Company.Name != null) {
|
||||
ctx.font = small;
|
||||
ctx.fillStyle = primary;
|
||||
ctx.fillText(strings.grandCompany, 480, infoTextSmallStartY + infoTextSpacing * 2); // Grand Company
|
||||
|
@ -659,7 +659,7 @@ exports.CardCreator = CardCreator;
|
|||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Sat Oct 08 2022 23:48:47 GMT+0000 (Coordinated Universal Time)
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Mon Oct 17 2022 21:53:50 GMT+0000 (Coordinated Universal Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
|
@ -111,7 +111,7 @@ example()
|
|||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Sat Oct 08 2022 23:48:47 GMT+0000 (Coordinated Universal Time)
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Mon Oct 17 2022 21:53:50 GMT+0000 (Coordinated Universal Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
Loading…
Reference in a new issue