Merge pull request #5390 from xyflow/update-marker-documentation

docs(edges): update marker documentation to include formatting info
This commit is contained in:
Moritz Klack
2025-07-09 12:08:34 +02:00
committed by GitHub
2 changed files with 8 additions and 4 deletions

View File

@@ -184,12 +184,12 @@ export type BaseEdgeProps = Omit<SVGAttributes<SVGPathElement>, 'd' | 'path' | '
path: string;
/**
* The id of the SVG marker to use at the start of the edge. This should be defined in a
* `<defs>` element in a separate SVG document or element.
* `<defs>` element in a separate SVG document or element. Use the format "url(#markerId)" where markerId is the id of your marker definition.
*/
markerStart?: string;
/**
* The id of the SVG marker to use at the end of the edge. This should be defined in a `<defs>`
* element in a separate SVG document or element.
* element in a separate SVG document or element. Use the format "url(#markerId)" where markerId is the id of your marker definition.
*/
markerEnd?: string;
};

View File

@@ -50,11 +50,15 @@ export type BaseEdgeProps = Pick<
labelX?: number;
/** The y coordinate of the label */
labelY?: number;
/** Marker at start of edge
/**
* The id of the SVG marker to use at the start of the edge. This should be defined in a
* `<defs>` element in a separate SVG document or element. Use the format "url(#markerId)" where markerId is the id of your marker definition.
* @example 'url(#arrow)'
*/
markerStart?: string;
/** Marker at end of edge
/**
* The id of the SVG marker to use at the end of the edge. This should be defined in a `<defs>`
* element in a separate SVG document or element. Use the format "url(#markerId)" where markerId is the id of your marker definition.
* @example 'url(#arrow)'
*/
markerEnd?: string;