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

Clusters have wrong position since version 8.2.3 (simple calculation issue) #538

Open
adhed opened this issue Jan 4, 2024 · 1 comment
Labels

Comments

@adhed
Copy link

adhed commented Jan 4, 2024

Describe the bug
Clusters have wrong position on the screen.

To Reproduce
Steps to reproduce the behavior:

  1. Use clusters in the latest versions.
  2. You will see that clusters have wrong position (translate / transform properties) and depending how many nodes are in a cluster - it will be going worse and worse.
  3. It's a simple issue with the latest code.

Expected behavior
Clusters have proper width to wrap all the nodes inside.

Screenshots
Screenshot 2024-01-04 at 14 34 42

Demo
https://stackblitz.com/edit/angular-kfufe3?file=src%2Fapp%2Fapp.component.ts

ngx-graph version
8.2.3 - only here, because it has been introduced in this PR: #528

Additional context

The issue is a simple wrong calculation here done for clusters: https://github.com/swimlane/ngx-graph/pull/528/files#diff-e500ec710d86f32d459d34a450582fe79dcb541617240d848fa6319a389fa46aR454

Please take a look that dividing by 2 is now done twice which causes the issue. The flag has been handled wrongly here.

@adhed adhed added the bug label Jan 4, 2024
@steveblue
Copy link
Contributor

This issue should be resolved in 8.2.4 @adhed. Thanks for reporting.

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