diff --git a/.vs/AAWebPlatform/v15/.suo b/.vs/AAWebPlatform/v15/.suo index 3c88494f1..8897b4435 100644 Binary files a/.vs/AAWebPlatform/v15/.suo and b/.vs/AAWebPlatform/v15/.suo differ diff --git a/Ecosystem.js b/Ecosystem.js index 793dfb2b8..459f8903d 100644 --- a/Ecosystem.js +++ b/Ecosystem.js @@ -73,6 +73,17 @@ function newEcosystem() { } } + function getPlotter(pTeam, pPlotterCodeName) { + + for (let i = 0; i < pTeam.plotters.length; i++) { + + if (pTeam.plotters[i].codeName === pPlotterCodeName) { + + return pTeam.plotters[i]; + } + } + } + function getProduct(pBot, pProductCodeName) { for (let i = 0; i < pBot.products.length; i++) { diff --git a/Panels/ProductsPanel.js b/Panels/ProductsPanel.js index 720da8957..a86ff3021 100644 --- a/Panels/ProductsPanel.js +++ b/Panels/ProductsPanel.js @@ -89,7 +89,7 @@ productCard.container.frame.position.x = position.x; productCard.container.frame.position.y = position.y + lastY; - lastY = lastY + productCard.container.frame.height * 1.25; + lastY = lastY + productCard.container.frame.height; /* Add to the Product Array */ diff --git a/ProductCard.js b/ProductCard.js index 57b3ebb8f..f323c90ba 100644 --- a/ProductCard.js +++ b/ProductCard.js @@ -80,7 +80,7 @@ this.container.frame.position = position; this.container.frame.width = 380; - this.container.frame.height = 80; + this.container.frame.height = 100; /* We retrieve the locally stored status of the Product */ @@ -286,12 +286,14 @@ /* - Put image on the card. + Put images on the card. */ - const devTeamImageSize = 45; - const botImageSize = 45; + const devTeamImageSize = 50; + const botImageSize = 50; + + /* First the Dev Team Profile Picture. */ let teamImagePoint = { x: 10, @@ -303,10 +305,12 @@ let teamImage = document.getElementById(thisObject.bot.devTeam + ".png"); browserCanvasContext.drawImage(teamImage, teamImagePoint.x, teamImagePoint.y, devTeamImageSize, devTeamImageSize); + /* Second the Bot's Profile Picture. */ + if (thisObject.bot.profilePicture !== undefined) { let botImagePoint = { - x: thisObject.container.frame.width - 10 - 50, + x: thisObject.container.frame.width - 10 - botImageSize - 5, y: thisObject.container.frame.height / 2 - botImageSize / 2 }; @@ -318,6 +322,11 @@ } + /* Third the Plotter's Profile Picture. */ + + + + /* Now the small circle */ centerPoint = { @@ -374,43 +383,53 @@ /* devTeam */ - label = "Dev Team: " + thisObject.devTeam.displayName; + label = thisObject.devTeam.displayName; labelPoint = { - x: 65, - y: thisObject.container.frame.height / 2 - 15 + x: 10 + devTeamImageSize / 2 - label.length / 2 * fontSize * 0.60, + y: thisObject.container.frame.height / 2 + devTeamImageSize / 2 + fontSize * 0.60 + 5 }; labelPoint = thisObject.container.frame.frameThisPoint(labelPoint); + browserCanvasContext.font = fontSize + 'px Courier New'; browserCanvasContext.fillStyle = 'rgba(60, 60, 60, 0.50)'; browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y); /* bot */ - label = "Bot: " + thisObject.bot.displayName; + label = thisObject.bot.displayName; labelPoint = { - x: 65, - y: thisObject.container.frame.height / 2 - 0 + x: thisObject.container.frame.width - 10 - botImageSize - 5 + botImageSize / 2 - label.length / 2 * fontSize * 0.60, + y: thisObject.container.frame.height / 2 + devTeamImageSize / 2 + fontSize * 0.60 + 5 }; labelPoint = thisObject.container.frame.frameThisPoint(labelPoint); + browserCanvasContext.font = fontSize + 'px Courier New'; browserCanvasContext.fillStyle = 'rgba(60, 60, 60, 0.50)'; browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y); /* product */ - label = "Product: " + thisObject.product.displayName; + fontSize = 12; + + label = thisObject.product.displayName; labelPoint = { x: 65, y: thisObject.container.frame.height / 2 + 15 }; + labelPoint = { + x: thisObject.container.frame.width / 2 - label.length / 2 * fontSize * 0.60, + y: thisObject.container.frame.height / 2 - devTeamImageSize / 2 - fontSize * 0.60 - 5 + }; + labelPoint = thisObject.container.frame.frameThisPoint(labelPoint); + browserCanvasContext.font = fontSize + 'px Courier New bold'; browserCanvasContext.fillStyle = 'rgba(60, 60, 60, 0.50)'; browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y); diff --git a/server.js b/server.js index 688473d01..a808359d5 100644 --- a/server.js +++ b/server.js @@ -814,6 +814,33 @@ function onBrowserRequest(request, response) { } } + + for (let j = 0; j < devTeam.plotters.length; j++) { + + let plotter = devTeam.plotters[j]; + + for (let k = 0; k < plotter.modules.length; k++) { + + let module = plotter.modules[k]; + + if (module.profilePicture !== undefined) { + + let htmlLineCopy = htmlLine; + + let stringToInsert; + stringToInsert = htmlLineCopy.replace('@devTeam@', devTeam.codeName); + stringToInsert = stringToInsert.replace('@repo@', plotter.repo); + stringToInsert = stringToInsert.replace('@image@', module.profilePicture); + stringToInsert = stringToInsert.replace('@id@', devTeam.codeName + "." + module.codeName + "." + module.profilePicture); + + let firstPart = fileContent.substring(0, fileContent.indexOf('') + 15); + let secondPart = fileContent.substring(fileContent.indexOf('') + 15); + + fileContent = firstPart + stringToInsert + secondPart; + + } + } + } } } }