refactor: removed start and end nodes from the addNode functionality as they are not supported for manual adding

removed unnecessary code.

BREAKING: end and start nodes are no longer supported by the dnd addNode functionality.

ref: N25B-114
This commit is contained in:
JGerla
2025-10-25 18:41:57 +02:00
parent b7cd925c2c
commit a0324479e6

View File

@@ -80,23 +80,9 @@ function addNode(nodeType: string, position: XYPosition) {
id: `phase-${phaseNumber}`, id: `phase-${phaseNumber}`,
type: nodeType, type: nodeType,
position, position,
data: {label: `"new"`, number: phaseNumber}, data: {label: 'new', number: phaseNumber},
}; };
} }
case "start":
return {
id: getId(),
type: nodeType,
position,
data: {label: `new start node`},
};
case "end":
return {
id: getId(),
type: nodeType,
position,
data: {label: `new end node`},
};
case "norm": case "norm":
{ {
const normNumber = nds.filter((node) => node.type === 'norm').length; const normNumber = nds.filter((node) => node.type === 'norm').length;