feat(edges): add smooth step type

This commit is contained in:
moklick
2020-07-13 15:24:14 +02:00
parent f719ea9423
commit b32d5454e1
7 changed files with 288 additions and 59 deletions
+2
View File
@@ -3,6 +3,7 @@ import { ComponentType } from 'react';
import StraightEdge from '../../components/Edges/StraightEdge';
import BezierEdge from '../../components/Edges/BezierEdge';
import StepEdge from '../../components/Edges/StepEdge';
import SmoothStepEdge from '../../components/Edges/SmoothStepEdge';
import wrapEdge from '../../components/Edges/wrapEdge';
import { EdgeTypesType, EdgeCompProps } from '../../types';
@@ -12,6 +13,7 @@ export function createEdgeTypes(edgeTypes: EdgeTypesType): EdgeTypesType {
default: wrapEdge((edgeTypes.default || BezierEdge) as ComponentType<EdgeCompProps>),
straight: wrapEdge((edgeTypes.bezier || StraightEdge) as ComponentType<EdgeCompProps>),
step: wrapEdge((edgeTypes.step || StepEdge) as ComponentType<EdgeCompProps>),
smoothstep: wrapEdge((edgeTypes.step || SmoothStepEdge) as ComponentType<EdgeCompProps>),
};
const wrappedTypes = {} as EdgeTypesType;