Skip to content

Commit 57a4c0d

Browse files
committed
Add brand text under the image
1 parent e2c7130 commit 57a4c0d

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/components/Map.svelte

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
}
133133
}
134134
135-
return 30;
135+
return 40;
136136
})
137137
)
138138
.force('charge', d3.forceManyBody())
@@ -232,6 +232,18 @@
232232
mask="url(#image-mask)"
233233
on:click={() => handleBrandClick(node.id)}
234234
/>
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>
235247
{/if}
236248
{/each}
237249

0 commit comments

Comments
 (0)