Skip to content

Commit

Permalink
Fix sequential splitting not saving
Browse files Browse the repository at this point in the history
  • Loading branch information
abrenneke committed Oct 25, 2023
1 parent 960ce52 commit 3db63a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/utils/serialization/serialization_v4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type SerializedNode = {
description?: string;
isSplitRun?: boolean;
splitRunMax?: number;

isSplitSequential?: boolean;
visualData: SerializedVisualData;
outgoingConnections: SerializedNodeConnection[] | undefined;
data?: unknown;
Expand Down Expand Up @@ -224,6 +224,7 @@ function toSerializedNode(node: ChartNode, allNodes: ChartNode[], allConnections
}/${node.visualData.color?.border ?? ''}/${node.visualData.color?.bg ?? ''}`,
isSplitRun: node.isSplitRun ? true : undefined,
splitRunMax: node.isSplitRun ? node.splitRunMax : undefined,

data: Object.keys(node.data ?? {}).length > 0 ? node.data : undefined,
outgoingConnections: outgoingConnections.length > 0 ? outgoingConnections : undefined,
variants: (node.variants?.length ?? 0) > 0 ? node.variants : undefined,
Expand Down Expand Up @@ -253,6 +254,7 @@ function fromSerializedNode(
description: serializedNode.description,
isSplitRun: serializedNode.isSplitRun ?? false,
splitRunMax: serializedNode.splitRunMax ?? 10,
isSplitSequential: serializedNode.isSplitSequential ?? false,
visualData: {
x: parseFloat(x!),
y: parseFloat(y!),
Expand Down

0 comments on commit 3db63a3

Please sign in to comment.