-
Notifications
You must be signed in to change notification settings - Fork 639
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
DYN-5807 : improve auto complete auto layout #15864
Conversation
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.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-5807
src/DynamoCoreWpf/ViewModels/Search/NodeSearchElementViewModel.cs
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
Rect2D connectedNodesBBBox = ComputeNodesBBox(connectedNodesToConsider); |
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.
maybe use a better name here? like
Rect2D NodesBoundingBox
=GetNodesBoundingBox
(connectedNodesToConsider);
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.
I recognize a copilot suggestion here! :))
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.
Bingo! ;)
return parameter as PortModel != null ? portModel.CanAutoCompleteInput() : true; | ||
} | ||
|
||
private Rect2D GetNodesBoundingBox(IEnumerable<NodeModel> nodes) |
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.
Looking great! Thank you for splitting these up. Would you add some comments to these new functions?
Would you attach a gif for the behavior change? Appreciate it |
Purpose
Improve auto complete auto layout in such way that fewer nodes overlap as a result of placing a new node suggested by auto complete. Also we do not want to launch auto complete if the port is an input port which already has a connection.
We will create a small ripple effect only in the area of the affected node that includes the node itself , the connected nodes on the affected side and some other nodes that are in this area.
Old Behaviour :

New Behaviour :

Declarations
Check these if you believe they are true
*.resx
files