refactor(edges)!: Replace getMarkerEnd utility with getMarkerId

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 35165c3a98
commit 8fbfca1e7a
3 changed files with 8 additions and 12 deletions
+3 -8
View File
@@ -344,16 +344,11 @@ export const isParentSelected = (node: GraphNode): boolean => {
}
export const getMarkerId = (marker: EdgeMarkerType | undefined): string => {
if (typeof marker === 'undefined') {
return ''
}
if (typeof marker === 'string') {
return marker
}
if (typeof marker === 'undefined') return ''
if (typeof marker === 'string') return marker
return Object.keys(marker)
.sort()
.map((key: string) => `${key}=${(marker as any)[key]}`)
.map((key) => `${key}=${marker[<keyof EdgeMarkerType>key]}`)
.join('&')
}