fix: fixed CSS scale() issue on WebKit by wrap up text in g tag
This commit is contained in:
parent
96f89ad2b7
commit
61442cb359
1 changed files with 11 additions and 10 deletions
|
@ -135,16 +135,17 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||||
})">
|
})">
|
||||||
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
|
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
|
||||||
<circle class="rank-circle" cx="-10" cy="8" r="40" />
|
<circle class="rank-circle" cx="-10" cy="8" r="40" />
|
||||||
<text
|
<g class="rank-text">
|
||||||
x="${rank.level.length === 1 ? "-4" : "0"}"
|
<text
|
||||||
y="0"
|
x="${rank.level.length === 1 ? "-4" : "0"}"
|
||||||
alignment-baseline="central"
|
y="0"
|
||||||
dominant-baseline="central"
|
alignment-baseline="central"
|
||||||
text-anchor="middle"
|
dominant-baseline="central"
|
||||||
class="rank-text"
|
text-anchor="middle"
|
||||||
>
|
>
|
||||||
${rank.level}
|
${rank.level}
|
||||||
</text>
|
</text>
|
||||||
|
</g>
|
||||||
</g>`;
|
</g>`;
|
||||||
|
|
||||||
// the better user's score the the rank will be closer to zero so
|
// the better user's score the the rank will be closer to zero so
|
||||||
|
|
Loading…
Add table
Reference in a new issue