rete
rete copied to clipboard
rete-auto-arrange-plugin needs height property defined
Describe the bug
If node has property height defined, then auto-arrange working fine, but node does not rendered properly - conrols can go outside of node. If node has property height undefined, then node autosizes height as needed, but auto-arrange is not working.
Guess that auto-arrange-plugin should autocalc node height like document.getElementById("div1").clientHeight or similar.
Example to reproduce
No response
How to reproduce
create a several nodes without height defined call auto-arrange
Expected behavior
auto-arrange nodes
Dependencies
"rete": "^2.0.3",
"rete-auto-arrange-plugin": "^2.0.1",
Platform
Chrome 121.0.6167.139
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
auto-arrange-plugin should autocalc node height like document.getElementById("div1").clientHeight
This won't work because the first arrangment may be performed before the nodes are rendered. For instance, LOD example doesn't render complete HTML node elements at all, but this is not a blocker for using the arrange plugin (although it is not actually used in this example)
Therefore, despite this solution is not built in, you can implement it: wait until nodes are rendered (this is not controlled by the framework itself, e.g. using animated nodes), and sync Node's height with htmlElement.clientHeight
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This issue was closed because it has been stalled for 10 days with no activity.