-
-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Assign Labels to Connections in DrawFlow Condition Node? #704
Comments
Thanks, But how to identify the link coming form true output or false output in exported json. Can we pass the outputId and node name to the create curvature function to implement node specific style to the link? |
In the export with |
Can you please provide with the code. this.editor.createCurvature = function (start_x, start_y, end_x, end_y, curvature_value, type) { Iam using this function to create curvatures, but now i want to pass the nodeid and outpuId (from which output the connection is creating) based on these values, i will put conditions inside above function and generate links respectively. |
CreateCurvature function not get the nodeId. But use events with connection created: editor.on('connectionCreated', (obj) => {
console.log(obj)
}); |
Is it possible to redraw the curvature of the connection within the 'connectionCreated' event handler? I would like to customize the curvature based on the newly created connection, its source node, and the output it is coming from. Specifically, I'd like to adjust the curvature based on different conditions depending on the source node and the specific output that was used to create the connection. Please help me. |
You could modify the creacteCurvature function in the code. Here, for example, there is a PR to add the input and output addresses of a node. |
I replaced the code mentioned there in drawflow.min.js, in angular But not working, is there any other fix for adding the input and output addresses of a node. |
Hi @jerosoler, Can you please help me with it |
out_dir and in_dir is not drawflow is the fork drawflow. I can't help you. From what I see in the PR, it has to indicate if it is top or bottom in the curve. |
I'm currently working with DrawFlow and I have a requirement to assign labels to connections in the condition node. The condition node has a rhombus shape and consists of one input and two outputs.
I would like to know how I can achieve the following behaviour:
When a connection is dragged from the right end of the condition node, I want to set the label of the connection to "true".
When a connection is dragged from the bottom of the condition node, I want to set the label of the connection to "false".
I would appreciate any guidance, code examples, or suggestions on how to implement this functionality in DrawFlow.
Please feel free to share your insights or point me in the right direction. Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: