feat: Add SimpleBezierEdge

* Implement base edge
This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent 7d91aa28c2
commit 56f7e3b0c2
15 changed files with 397 additions and 224 deletions
+11 -1
View File
@@ -8,7 +8,16 @@ import {
ConnectionLineType,
FlowOptions,
} from '~/types'
import { DefaultNode, InputNode, OutputNode, BezierEdge, SmoothStepEdge, StepEdge, StraightEdge } from '~/components'
import {
DefaultNode,
InputNode,
OutputNode,
BezierEdge,
SmoothStepEdge,
StepEdge,
StraightEdge,
SimpleBezierEdge,
} from '~/components'
export const defaultNodeTypes: DefaultNodeTypes = {
input: InputNode,
@@ -21,6 +30,7 @@ export const defaultEdgeTypes: DefaultEdgeTypes = {
straight: StraightEdge,
step: StepEdge,
smoothstep: SmoothStepEdge,
simplebezier: SimpleBezierEdge,
}
const isDef = <T>(val: T): val is NonNullable<T> => typeof val !== 'undefined'