feat: delete the edge on the classification node anchor when the anch… (#1297)
### What problem does this PR solve? feat: delete the edge on the classification node anchor when the anchor is connected to other nodes #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -167,13 +167,13 @@ export const buildDslComponentsByGraph = (
|
||||
return components;
|
||||
};
|
||||
|
||||
export const getOperatorType = (id: string | null) => {
|
||||
export const getOperatorTypeFromId = (id: string | null) => {
|
||||
return id?.split(':')[0] as Operator | undefined;
|
||||
};
|
||||
|
||||
// restricted lines cannot be connected successfully.
|
||||
export const isValidConnection = (connection: Connection) => {
|
||||
return RestrictedUpstreamMap[
|
||||
getOperatorType(connection.source) as Operator
|
||||
]?.every((x) => x !== getOperatorType(connection.target));
|
||||
getOperatorTypeFromId(connection.source) as Operator
|
||||
]?.every((x) => x !== getOperatorTypeFromId(connection.target));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user