Products Re arranged
This commit is contained in:
1 parent
8edf372adb
commit
96ea717ff9
5 files changed
+70
-13
No files matched your search
Binary file not shown.
@@ -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++) {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
+31
-12
@@ -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);
|
||||
|
||||
|
||||
@@ -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('<!--Images-->') + 15);
|
||||
let secondPart = fileContent.substring(fileContent.indexOf('<!--Images-->') + 15);
|
||||
|
||||
fileContent = firstPart + stringToInsert + secondPart;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user