-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: When adding a new node, the default execution condition is' all ', which often results in errors. Adjust it to default to any #4443
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -199,8 +199,8 @@ function clickNodes(item: any, data?: any) { | |
| })), | ||
| } | ||
| } | ||
| item['properties']['condition'] = 'OR' | ||
| props.workflowRef?.addNode(item) | ||
|
|
||
| emit('clickNodes', item) | ||
| } | ||
|
|
||
|
|
@@ -219,6 +219,7 @@ function onmousedown(item: any, data?: any) { | |
| })), | ||
| } | ||
| } | ||
| item['properties']['condition'] = 'OR' | ||
| props.workflowRef?.onmousedown(item) | ||
| emit('onmousedown', item) | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code does not have any apparent syntax errors or logical flaws that would cause significant issues. However, there are several areas where improvements can be made:
Overall, the code seems functional with minor enhancements in terms of best practices such as documentation and potentially simplifying null checks if appropriate. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code appears to handle node creation based on user interactions with different tools (e.g., adding nodes of specific types like "PROCESS" or "DATA_SOURCE"). There are a few recommendations:
props.workflowRefis valid before calling its methods (addNodeandonmousedown). Consider adding checks to avoid errors.clickNodesandonmousedown), set'condition'property to'OR'. This seems consistent across updates, but ensure it fits the intended logic in your use case.item, consider adding it at appropriate points within these functions for better clarity and maintainability.Overall, the code looks generally correct for handling mouse events related to workflow node additions and modifications, but careful attention should be paid to ensuring method calls operate safely under all conditions.