feat(edges): add arrow head options

This commit is contained in:
moklick
2020-07-14 12:57:12 +02:00
parent 1b3f58486a
commit 0593db289a
13 changed files with 157 additions and 10 deletions
+9
View File
@@ -0,0 +1,9 @@
import { ArrowHeadType } from '../../types';
export const getMarkerEnd = (arrowHeadType?: ArrowHeadType, markerEndId?: string): string => {
if (typeof markerEndId !== 'undefined' && markerEndId) {
return `url(#${markerEndId})`;
}
return typeof arrowHeadType !== 'undefined' ? `url(#react-flow__${arrowHeadType})` : 'none';
};