Skip to content
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

rete-auto-arrange-plugin needs height property defined #712

Open
1 task done
Krong opened this issue Jul 24, 2024 · 1 comment
Open
1 task done

rete-auto-arrange-plugin needs height property defined #712

Krong opened this issue Jul 24, 2024 · 1 comment
Labels

Comments

@Krong
Copy link

Krong commented Jul 24, 2024

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

  • I agree to follow this project's Code of Conduct
@Krong Krong added the bug label Jul 24, 2024
@Ni55aN
Copy link
Member

Ni55aN commented Jul 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants