refactor(state): separate nodes and edges

This commit is contained in:
moklick
2021-10-19 11:09:49 +02:00
parent 3dc79276ad
commit 410b12946d
22 changed files with 634 additions and 537 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ export default (EdgeComponent: ComponentType<EdgeProps>) => {
data,
onClick,
onEdgeDoubleClick,
selected,
isSelected,
animated,
label,
labelStyle,
@@ -69,7 +69,7 @@ export default (EdgeComponent: ComponentType<EdgeProps>) => {
'react-flow__edge',
`react-flow__edge-${type}`,
className,
{ selected, animated, inactive, updating },
{ selected: isSelected, animated, inactive, updating },
]);
const edgeElement = useMemo<Edge>(() => {
@@ -219,7 +219,7 @@ export default (EdgeComponent: ComponentType<EdgeProps>) => {
id={id}
source={source}
target={target}
selected={selected}
isSelected={isSelected}
animated={animated}
label={label}
labelStyle={labelStyle}