Spaces:
Running
Running
Jimin Huang
commited on
Commit
·
a60d5fe
1
Parent(s):
8dd914e
Change settings
Browse files
src/components/CompareChartE.vue
CHANGED
|
@@ -46,7 +46,7 @@ function getAgentColor(agent, idx = 0) {
|
|
| 46 |
return AGENT_PALETTE[idx % AGENT_PALETTE.length]
|
| 47 |
}
|
| 48 |
|
| 49 |
-
function drawImageInCircle(ctx, img, cx, cy, radius, { mode = '
|
| 50 |
if (!img) return;
|
| 51 |
const r = Math.max(0, radius - padding);
|
| 52 |
ctx.save();
|
|
@@ -144,7 +144,7 @@ async function composeBadge(agent, model, color = '#666') {
|
|
| 144 |
|
| 145 |
// agent logo (fit into inner circle)
|
| 146 |
if (aImg) {
|
| 147 |
-
drawImageInCircle(ctx, aImg, R, R, R - 1, { mode: '
|
| 148 |
}
|
| 149 |
|
| 150 |
// model puck (bottom-right)
|
|
|
|
| 46 |
return AGENT_PALETTE[idx % AGENT_PALETTE.length]
|
| 47 |
}
|
| 48 |
|
| 49 |
+
function drawImageInCircle(ctx, img, cx, cy, radius, { mode = 'contain', padding = 0 } = {}) {
|
| 50 |
if (!img) return;
|
| 51 |
const r = Math.max(0, radius - padding);
|
| 52 |
ctx.save();
|
|
|
|
| 144 |
|
| 145 |
// agent logo (fit into inner circle)
|
| 146 |
if (aImg) {
|
| 147 |
+
drawImageInCircle(ctx, aImg, R, R, R - 1, { mode: 'contain', padding: 6 });
|
| 148 |
}
|
| 149 |
|
| 150 |
// model puck (bottom-right)
|