2 labels per ball
This commit is contained in:
1 parent
834ea338ba
commit
27c72c8586
4 files changed
+31
-10
No files matched your search
Binary file not shown.
@@ -227,17 +227,37 @@ function newBall() {
|
||||
|
||||
browserCanvasContext.font = fontSize + 'px Courier New';
|
||||
|
||||
let label = thisObject.input.label;
|
||||
let label;
|
||||
|
||||
label = thisObject.input.upLabel;
|
||||
|
||||
labelPoint = {
|
||||
x: thisObject.currentPosition.x - label.length / 2 * fontSize * 0.60,
|
||||
y: thisObject.currentPosition.y + thisObject.currentImageSize / 2 + fontSize * 0.60 + 5
|
||||
};
|
||||
if (label !== undefined) {
|
||||
|
||||
browserCanvasContext.font = fontSize + 'px Courier New';
|
||||
browserCanvasContext.fillStyle = thisObject.labelStrokeStyle;
|
||||
browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y);
|
||||
labelPoint = {
|
||||
x: thisObject.currentPosition.x - label.length / 2 * fontSize * 0.60,
|
||||
y: thisObject.currentPosition.y - thisObject.currentImageSize / 2 - fontSize * 0.60 - 5
|
||||
};
|
||||
|
||||
browserCanvasContext.font = fontSize + 'px Courier New';
|
||||
browserCanvasContext.fillStyle = thisObject.labelStrokeStyle;
|
||||
browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y);
|
||||
|
||||
}
|
||||
|
||||
label = thisObject.input.downLabel;
|
||||
|
||||
if (label !== undefined) {
|
||||
|
||||
labelPoint = {
|
||||
x: thisObject.currentPosition.x - label.length / 2 * fontSize * 0.60,
|
||||
y: thisObject.currentPosition.y + thisObject.currentImageSize / 2 + fontSize * 0.60 + 10
|
||||
};
|
||||
|
||||
browserCanvasContext.font = fontSize + 'px Courier New';
|
||||
browserCanvasContext.fillStyle = thisObject.labelStrokeStyle;
|
||||
browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ function newCompetitionStorage(pName) {
|
||||
|
||||
let devTeam = ecosystem.getTeam(pCompetition.participants[i].devTeam);
|
||||
let bot = ecosystem.getBot(devTeam, pCompetition.participants[i].bot)
|
||||
let product = ecosystem.getProduct(bot, "Trading History");
|
||||
let product = ecosystem.getProduct(bot, "Live Trading History");
|
||||
|
||||
for (let i = 0; i < product.dataSets.length; i++) {
|
||||
|
||||
|
||||
+2
-1
@@ -265,7 +265,8 @@
|
||||
|
||||
let imageId = pProductCard.bot.devTeam + "." + pProductCard.bot.profilePicture;
|
||||
|
||||
productPlotter.plotter.profile.label = pProductCard.bot.displayName;
|
||||
productPlotter.plotter.profile.upLabel = pProductCard.product.shortDisplayName;
|
||||
productPlotter.plotter.profile.downLabel = pProductCard.bot.displayName;
|
||||
productPlotter.plotter.profile.imageId = imageId;
|
||||
|
||||
productPlotter.profile = canvas.floatingSpace.createNewBall(productPlotter.plotter.profile, thisObject.container)
|
||||
|
||||
Reference in new issue
Block a user