refactor(edges): pass original source and target ids, cleanup #476

This commit is contained in:
moklick
2020-09-15 11:17:06 +02:00
parent 63d1e4b218
commit 0b15211e18
5 changed files with 116 additions and 101 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import React, { memo } from 'react';
import EdgeText from './EdgeText';
import { getMarkerEnd, getCenter } from './utils';
import { EdgeBezierProps, Position } from '../../types';
import { EdgeProps, Position } from '../../types';
interface GetBezierPathParams {
sourceX: number;
@@ -55,7 +55,7 @@ export default memo(
style,
arrowHeadType,
markerEndId,
}: EdgeBezierProps) => {
}: EdgeProps) => {
const [centerX, centerY] = getCenter({ sourceX, sourceY, targetX, targetY });
const path = getBezierPath({
sourceX,