There was an error while loading. Please reload this page.
1 parent e2c7130 commit 57a4c0dCopy full SHA for 57a4c0d
1 file changed
src/components/Map.svelte
@@ -132,7 +132,7 @@
132
}
133
134
135
- return 30;
+ return 40;
136
})
137
)
138
.force('charge', d3.forceManyBody())
@@ -232,6 +232,18 @@
232
mask="url(#image-mask)"
233
on:click={() => handleBrandClick(node.id)}
234
/>
235
+ <!-- Add text under the image -->
236
+ <text
237
+ x={node.x}
238
+ y={node.y + 30}
239
+ text-anchor="middle"
240
+ font-size="8px"
241
+ fill="#444"
242
+ font-family="sans-serif"
243
+ font-weight="medium"
244
+ >
245
+ {node.id}
246
+ </text>
247
{/if}
248
{/each}
249
0 commit comments