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

Setting cluster fixed option doesn't do anything in hierarchical layout #179

Closed
Tyler-Maclachlan opened this issue Oct 24, 2019 · 6 comments

Comments

@Tyler-Maclachlan
Copy link
Contributor

I'm using the hierarchical layout, and on node dragStart I update the node fixed property to

fixed: {
  x: false,
  y: false
}

While this works for non-clustered nodes it doesn't seem to work for clusters.

Here is a codepen example

@Thomaash
Copy link
Member

Hi @Tyler-Maclachlan,

I'm not exactly sure what you're trying to achieve. Could you provide more info, please?

@Tyler-Maclachlan
Copy link
Contributor Author

I am trying to be able to move the nodes freely and not only on one axis.

@Thomaash
Copy link
Member

So disable hierarchical layout. The whole purpose of this layout is to prevent what you're trying to do.

@Tyler-Maclachlan
Copy link
Contributor Author

Just to give you some more context, we're using the hierarchical layout for positioning because it is the most visually aesthetic option in our use case; however, we would like to allow for moving nodes around on both axes.We managed to make it work by unsetting fixed on dragStart which works for nodes but not for clustered nodes. Clustered nodes seem to ignore fixed: {x: false, y: false}. Does that make sense?

Enabling and Disabling the hierarchical layout has the issue I posted earlier #178

@Thomaash
Copy link
Member

Yeah, I understand what you're doing. The problem is that hierarchical layout is not supposed to be used in this way.

@ChickenSaysBak
Copy link

Experiencing the exact same issue. I want the hierarchical layout on initialization, but after that, I want the nodes where they can be freely positioned by the user (I have physics off).

I've achieved this with the same approach of disabling fixed on dragStart but this doesn't work on clustered nodes.

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

No branches or pull requests

3 participants