This example demonstrates how to control which input connectors can be connected to a given output connector. The rules work in two ways:
On the output side you define the array fCanBeConnectedInputs, which may include specific input IDs and/or categories. During a drag operation, the system checks whether the target input’s ID or category is present in that array — only then the connection is allowed.
When a connection starts being dragged:
This gives the user immediate feedback about which inputs are connectable.
[component.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/connectors/connection-rules/connection-rules.html [component.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/connectors/connection-rules/connection-rules.ts [component.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/connectors/connection-rules/connection-rules.scss [common.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/_flow-common.scss