refactor(edges)!: Replace getMarkerEnd utility with getMarkerId
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+3
-8
@@ -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('&')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user