plotter banners implemented

This commit is contained in:
Luis Fernando Molina committed 2019-12-14 15:34:26 +01:00
1 parent 6418b270c4
commit c295a59f4b
2 files changed
+12 -2

No files matched your search

+10 -2
View File
@@ -229,7 +229,15 @@ function newProductCard () {
legacyPlotterBannerLoaded = true
}
legacyPlotterBanner.src = window.canvasApp.urlPrefix + 'Images/' + PLOTTER_TEAM + '/' + PLOTTER_REPO + '/' + PLOTTER_PROFILE_PIC
if (PLOTTER_PROFILE_PIC !== undefined) {
legacyPlotterBanner.src = window.canvasApp.urlPrefix + 'Images/' + PLOTTER_TEAM + '/' + PLOTTER_REPO + '/' + PLOTTER_PROFILE_PIC
} else {
if (thisObject.product.plotter.banner !== undefined) {
legacyPlotterBanner.src = window.canvasApp.urlPrefix + 'Images/' + thisObject.product.plotter.banner + '-Banner.PNG'
} else {
legacyPlotterBanner.src = window.canvasApp.urlPrefix + 'Images/' + 'Default-Banner.PNG'
}
}
const TEAM = thisObject.devTeam.codeName.toLowerCase()
const BOT = thisObject.bot.codeName.toLowerCase()
@@ -526,7 +534,7 @@ function newProductCard () {
}
}
/* Third the Plotter's Profile Picture. */
if (thisObject.product.plotter.profilePicture !== undefined) {
if (thisObject.product.plotter.profilePicture !== undefined || thisObject.product.plotter.legacy === false) {
let plotterImagePoint = {
x: thisObject.container.frame.width / 2 - plotterImageSize.width / 2,
y: thisObject.container.frame.height / 2 - plotterImageSize.height / 2
+2
View File
@@ -131,6 +131,7 @@ function newProductsPanel () {
try {
let code = JSON.parse(plotterModuleNode.code)
plotterModule.codeName = code.codeName
plotterModule.banner = code.banner
} catch (err) {
continue
}
@@ -163,6 +164,7 @@ function newProductsPanel () {
product.plotter = plotter
product.plotter.devTeam = plotterTeam.codeName
product.plotter.moduleName = plotterModule.codeName
product.plotter.banner = plotterModule.banner
product.plotter.legacy = false
product.plotter.module = { panels: [] }
product.displayName = productNode.name