From 1ae5659b6b71695bca64ea173b6d4e9a7caab2c4 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 11 Feb 2023 02:13:20 +0100 Subject: [PATCH] fix(core): allow null for deprecated connection line type Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --- packages/core/src/store/state.ts | 2 +- packages/core/src/types/flow.ts | 2 +- packages/core/src/types/store.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/store/state.ts b/packages/core/src/store/state.ts index 309e8c33..2909bd7b 100644 --- a/packages/core/src/store/state.ts +++ b/packages/core/src/store/state.ts @@ -77,7 +77,7 @@ const defaultState = (): State => ({ defaultMarkerColor: '#b1b1b7', connectionLineStyle: {}, - connectionLineType: ConnectionLineType.Bezier, + connectionLineType: null, connectionLineOptions: { type: ConnectionLineType.Bezier, style: {}, diff --git a/packages/core/src/types/flow.ts b/packages/core/src/types/flow.ts index d4a479cf..c6fdcac8 100644 --- a/packages/core/src/types/flow.ts +++ b/packages/core/src/types/flow.ts @@ -114,7 +114,7 @@ export interface FlowProps { nodeTypes?: NodeTypesObject connectionMode?: ConnectionMode /** @deprecated use {@link ConnectionLineOptions.type} */ - connectionLineType?: ConnectionLineType + connectionLineType?: ConnectionLineType | null /** @deprecated use {@link ConnectionLineOptions.style} */ connectionLineStyle?: CSSProperties | null connectionLineOptions?: ConnectionLineOptions diff --git a/packages/core/src/types/store.ts b/packages/core/src/types/store.ts index b7e74a6d..1e8c7b75 100644 --- a/packages/core/src/types/store.ts +++ b/packages/core/src/types/store.ts @@ -81,7 +81,7 @@ export interface State extends Omit { connectionMode: ConnectionMode connectionLineOptions: ConnectionLineOptions /** @deprecated use {@link ConnectionLineOptions.type} */ - connectionLineType: ConnectionLineType + connectionLineType: ConnectionLineType | null /** @deprecated use {@link ConnectionLineOptions.style} */ connectionLineStyle: CSSProperties | null connectionStartHandle: StartHandle | null