chore(markers): cleanup marker api

This commit is contained in:
Christopher Möller
2021-11-24 12:02:09 +01:00
parent 3011efd101
commit 0f480444f2
6 changed files with 71 additions and 46 deletions
+3 -3
View File
@@ -1,11 +1,11 @@
import { ArrowHeadType, Position } from '../../types';
import { MarkerType, Position } from '../../types';
export const getMarkerEnd = (arrowHeadType?: ArrowHeadType, markerEndId?: string): string => {
export const getMarkerEnd = (markerType?: MarkerType, markerEndId?: string): string => {
if (typeof markerEndId !== 'undefined' && markerEndId) {
return `url(#${markerEndId})`;
}
return typeof arrowHeadType !== 'undefined' ? `url(#react-flow__${arrowHeadType})` : 'none';
return typeof markerType !== 'undefined' ? `url(#react-flow__${markerType})` : 'none';
};
export interface GetCenterParams {