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

Rescale Initial Node Positions #92

Merged
merged 1 commit into from
Dec 20, 2023
Merged

Conversation

Stukova
Copy link
Contributor

@Stukova Stukova commented Dec 20, 2023

Previously, when nodes had initial positions with negative X or Y values, the Many Body force pushed these nodes towards the left or right boundaries. This issue occurred because the boundaries were simulated in a space from 0 to spaceSize value.

We decided to rescale the initial coordinates of the nodes to fit the simulation space while preserving the proportion. This ensures that nodes with negative initial positions are correctly handled and prevents them from being pushed to the boundaries.

@Stukova Stukova added the bug Something isn't working label Dec 20, 2023
@Stukova Stukova requested a review from rokotyan December 20, 2023 09:39
@Stukova Stukova force-pushed the fix/scaling-node-positions branch from 7d44ee3 to 2029c58 Compare December 20, 2023 11:16
@rokotyan rokotyan merged commit 2686c7d into main Dec 20, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants