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

What should I do if I want to unfix a node #162

Open
maliusbb1a opened this issue Oct 16, 2024 · 1 comment
Open

What should I do if I want to unfix a node #162

maliusbb1a opened this issue Oct 16, 2024 · 1 comment

Comments

@maliusbb1a
Copy link

What should I do if I want to unfix a node

@dash14
Copy link
Owner

dash14 commented Oct 27, 2024

Hi @465223840,
Sorry for the late reply.
Am I correct in understanding that when using d3 force-layout, you want to dynamically unfix the position of a node?
There was a bug in which dynamically unfixing a node was not reflected, but this has been fixed in v0.9.18.
It can be unfixed as follows:

const layouts = ref({
  nodes: {
    node0: { x: 0, y: 0, fixed: true },
  },
})

function unfix() {
  layouts.nodes["node0"].fixed = false;
}

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

2 participants