forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
635 B
24 lines
635 B
import React from 'react';
|
|
|
|
/**
|
|
* In SVG you need to supply this kind of marker that can be then referenced from a line segment as an ending of the
|
|
* line turning in into arrow. Needs to be included in the svg element and then referenced as markerEnd="url(#triangle)"
|
|
*/
|
|
export function EdgeArrowMarker() {
|
|
return (
|
|
<defs>
|
|
<marker
|
|
id="triangle"
|
|
viewBox="0 0 10 10"
|
|
refX="8"
|
|
refY="5"
|
|
markerUnits="strokeWidth"
|
|
markerWidth="10"
|
|
markerHeight="10"
|
|
orient="auto"
|
|
>
|
|
<path d="M 0 0 L 10 5 L 0 10 z" fill="#999" />
|
|
</marker>
|
|
</defs>
|
|
);
|
|
}
|
|
|