mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 07:14:05 +00:00
fix:incorrect node name length calculation (#252)
This commit is contained in:
parent
0e15c023cc
commit
8077043c7e
@ -42,7 +42,7 @@ limitations under the License. -->
|
|||||||
:y="n.y - 38"
|
:y="n.y - 38"
|
||||||
:href="!n.type || n.type === `N/A` ? icons.UNDEFINED : icons[n.type.toUpperCase().replace('-', '')]"
|
:href="!n.type || n.type === `N/A` ? icons.UNDEFINED : icons[n.type.toUpperCase().replace('-', '')]"
|
||||||
/>
|
/>
|
||||||
<text :x="n.x - (n.name.length * 6) / 2 + 6" :y="n.y + n.height + 8" style="pointer-events: none">
|
<text :x="n.x - (Math.min(n.name.length, 20) * 6) / 2 + 6" :y="n.y + n.height + 8" style="pointer-events: none">
|
||||||
{{ n.name.length > 20 ? `${n.name.substring(0, 20)}...` : n.name }}
|
{{ n.name.length > 20 ? `${n.name.substring(0, 20)}...` : n.name }}
|
||||||
</text>
|
</text>
|
||||||
</g>
|
</g>
|
||||||
|
Loading…
Reference in New Issue
Block a user