mirror of
https://github.com/mermaid-js/mermaid.git
synced 2026-05-23 20:10:38 +00:00
fix: use xlink:href for SVG icon references in treeView renderer
Headless Chrome (used by Argos CI screenshots) does not resolve bare href on <use> elements. Switch to xlink:href to match the convention used by other mermaid diagrams (e.g. sequence diagram actors).
This commit is contained in:
@@ -65,7 +65,7 @@ const positionLabel = (
|
||||
if (showIcon) {
|
||||
nodeGroup
|
||||
.append('use')
|
||||
.attr('href', `#tv-icon-${diagramId}-${node.iconId}`)
|
||||
.attr('xlink:href', `#tv-icon-${diagramId}-${node.iconId}`)
|
||||
.attr('x', x + config.paddingX)
|
||||
.attr('y', y + config.paddingY)
|
||||
.attr('width', ICON_SIZE)
|
||||
|
||||
Reference in New Issue
Block a user