It seems you are interested in applying the combo working principle from AntV G6 version 5 to version 4. In version 5, the combo automatically adjusts its size when a node is dragged, ensuring the node remains within the combo. However, in version 4, the node can be dragged out of the combo, which is not the desired behavior for your use case.
Unfortunately, I cannot provide a direct solution for version 4 as it might require significant changes to the underlying code or logic, which is not supported in the older version. However, I can suggest a workaround or guide you on how to implement a similar feature:
Custom Drag Behavior: You can implement a custom drag behavior that checks the node's position during the drag event. If the node is about to leave the combo's boundary, you can programmatically adjust its position to keep it inside.
Update Combo Size Manually: You can manually update the combo's size based on the positions of its child nodes. This might involve recalculating the bounding box of the combo whenever a node is moved.
Event Listeners: Use event listeners to monitor node movements and apply constraints to ensure nodes remain within the combo.
If you are willing to contribute, you might consider implementing these features and sharing them with the community. If you need further assistance or specific code examples, feel free to ask!
For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.