Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -740,11 +740,11 @@ function exportBadgePNG(type, pct, score, verdict, medal, date) {
|
|
| 740 |
// 6. Score & Prozent
|
| 741 |
ctx.textAlign = 'right';
|
| 742 |
ctx.font = '900 100px Arial, sans-serif';
|
| 743 |
-
ctx.fillText(pct + '%', 1110,
|
| 744 |
|
| 745 |
ctx.font = 'bold 28px Arial, sans-serif';
|
| 746 |
ctx.fillStyle = '#666';
|
| 747 |
-
ctx.fillText('Score: ' + score, 1110,
|
| 748 |
|
| 749 |
// 7. Urteil (mit automatischem Zeilenumbruch)
|
| 750 |
ctx.textAlign = 'left';
|
|
@@ -753,7 +753,7 @@ function exportBadgePNG(type, pct, score, verdict, medal, date) {
|
|
| 753 |
|
| 754 |
const words = verdict.split(' ');
|
| 755 |
let line = '"';
|
| 756 |
-
let y =
|
| 757 |
for(let n = 0; n < words.length; n++) {
|
| 758 |
let testLine = line + words[n] + ' ';
|
| 759 |
let metrics = ctx.measureText(testLine);
|
|
|
|
| 740 |
// 6. Score & Prozent
|
| 741 |
ctx.textAlign = 'right';
|
| 742 |
ctx.font = '900 100px Arial, sans-serif';
|
| 743 |
+
ctx.fillText(pct + '%', 1110, 160);
|
| 744 |
|
| 745 |
ctx.font = 'bold 28px Arial, sans-serif';
|
| 746 |
ctx.fillStyle = '#666';
|
| 747 |
+
ctx.fillText('Score: ' + score, 1110, 270);
|
| 748 |
|
| 749 |
// 7. Urteil (mit automatischem Zeilenumbruch)
|
| 750 |
ctx.textAlign = 'left';
|
|
|
|
| 753 |
|
| 754 |
const words = verdict.split(' ');
|
| 755 |
let line = '"';
|
| 756 |
+
let y = 360;
|
| 757 |
for(let n = 0; n < words.length; n++) {
|
| 758 |
let testLine = line + words[n] + ' ';
|
| 759 |
let metrics = ctx.measureText(testLine);
|