-
Notifications
You must be signed in to change notification settings - Fork 49
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
Force graph doesn't have force physics after rendering #393
Comments
@mossy426 Can you please tell which version of Unovis do you use? We had a bug in the code that has been fixed in one of the latest betas but didn't make it to the main release yet. |
All good! I'm using the 1.4.1 build. Should I switch to another? |
@mossy426 It turned out that |
@rokotyan I updated the environment on stackblitz for a quick test to use 1.4.1-alpha.8 for both packages and it appears to still not work, even with fixNodePositionAfterSimulation set to false. https://stackblitz.com/edit/angular-zyybxk?file=src%2Fforce-graph%2Fforce-graph.component.ts |
Thanks @mossy426! I think I know what was causing this. I've just published new package versions |
Great! Thanks, please let me know when I can try it out |
@mossy426 Strange, NPM shows it's there. Let's wait a bit and I'll try to release another version if it still doesn't work. ![]() ![]() |
Interesting, yes it might take a bit I guess? I'm getting an unable to resolve package error when trying that. I'll check back later. |
@rokotyan Ok I was able to download both packages for https://stackblitz.com/edit/angular-zyybxk?file=src%2Fforce-graph%2Fforce-graph.component.ts |
@mossy426 Thanks, investigating |
@mossy426 I've tried your example on my end with different fixNodePositionAfterSimulation: trueScreen.Recording.2024-06-10.at.14.10.53.web.mp4fixNodePositionAfterSimulation: falseScreen.Recording.2024-06-10.at.14.15.18.web.mp4Can you please tell us a bit more about what behavior you're expecting? |
@rokotyan Oh wow ok I'm sorry I should have clarified better. I mean with the force graphs in d3 we are using, the forces are always active. Here the forces are only active on load and then all the nodes become fixed, or unaffected by forces and stay in place now matter how you move other nodes around. For instance, in the force graph I'm talking about, if we were to take a node and move it around the network, you would see the surrounding nodes kind of move out of the way and readjust due to the forces the nodes give off. Here the nodes are fixed in that no forces affect them after launch. If they weren't fixed, I could then adjust the forces like link strength, center force, etc. in a variety of ways that would animate and help shape the network to what the user is looking for much more easily. Does that make sense? |
@mossy426 Ah, I get it now, thanks for the clarification! We intentionally disabled animated force layout because:
In your specific case, if you adjust the forces, you should still be able to see the updated layout on the graph. However, the animation won't look as organic as the force layout generally does because the node positions are simply interpolated between the two states. Or are you experiencing issues with this too? |
Got it, thanks! We should be good. I'll let you know if we need anything. |
This might be a misunderstanding, but we have properties for "force" in the layout settings like so:
And we also have the "fixNodePositionAfterSimulation" property within that as well.
It doesn't seem to matter if you set fixNodePositionAfterSimulation to true or false. Even in the gallery you guys have, the nodes are always fixed. It seems the only force for a force graph is upon initialization of the graph, otherwise everything is pinned and not acted on by forces.
In our Microbetrace application, you can change the charge, force strength, etc. of the network at any time. Is this not possible in Unovis?/Are all nodes pinned after instantiation regardless of whatever layout you choose?
Might be more of a discussion than an issue, but please let me know :)
The text was updated successfully, but these errors were encountered: