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:
@@ -80,23 +80,9 @@ function addNode(nodeType: string, position: XYPosition) {
|
||||
id: `phase-${phaseNumber}`,
|
||||
type: nodeType,
|
||||
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":
|
||||
{
|
||||
const normNumber = nds.filter((node) => node.type === 'norm').length;
|
||||
|
||||
Reference in New Issue
Block a user