feat: add directed arrowheads to mindmap links
This commit is contained in:
@@ -262,6 +262,22 @@ export const A2UIMindmap: React.FC<A2UIComponentProps> = ({ component }) => {
|
|||||||
viewBox={`0 0 ${layout.svgWidth} ${layout.svgHeight}`}
|
viewBox={`0 0 ${layout.svgWidth} ${layout.svgHeight}`}
|
||||||
preserveAspectRatio="xMidYMid meet"
|
preserveAspectRatio="xMidYMid meet"
|
||||||
>
|
>
|
||||||
|
<defs>
|
||||||
|
<marker
|
||||||
|
id={`${component.id}-arrow`}
|
||||||
|
viewBox="0 0 10 6"
|
||||||
|
refX="9"
|
||||||
|
refY="3"
|
||||||
|
markerWidth="8"
|
||||||
|
markerHeight="6"
|
||||||
|
orient="auto"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M0,0 L10,3 L0,6"
|
||||||
|
className="assistant-panel-mindmap-arrow"
|
||||||
|
/>
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
{/* Links */}
|
{/* Links */}
|
||||||
{layout.links.map((link, i) => (
|
{layout.links.map((link, i) => (
|
||||||
<path
|
<path
|
||||||
@@ -269,6 +285,7 @@ export const A2UIMindmap: React.FC<A2UIComponentProps> = ({ component }) => {
|
|||||||
className="assistant-panel-mindmap-link"
|
className="assistant-panel-mindmap-link"
|
||||||
d={edgePath(link.points)}
|
d={edgePath(link.points)}
|
||||||
fill="none"
|
fill="none"
|
||||||
|
markerEnd={`url(#${component.id}-arrow)`}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{/* Nodes */}
|
{/* Nodes */}
|
||||||
|
|||||||
@@ -454,6 +454,10 @@
|
|||||||
stroke-width: 1.5;
|
stroke-width: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.assistant-panel-mindmap-arrow {
|
||||||
|
fill: var(--vscode-panel-border);
|
||||||
|
}
|
||||||
|
|
||||||
.assistant-panel-mindmap-label {
|
.assistant-panel-mindmap-label {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
fill: var(--vscode-foreground);
|
fill: var(--vscode-foreground);
|
||||||
|
|||||||
Reference in New Issue
Block a user