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

network.focus locks manipulation and interaction #161

Open
sk8Guerra opened this issue Aug 8, 2024 · 0 comments
Open

network.focus locks manipulation and interaction #161

sk8Guerra opened this issue Aug 8, 2024 · 0 comments

Comments

@sk8Guerra
Copy link

sk8Guerra commented Aug 8, 2024

Hey. I have a getNetwork={(network) => setLocalNetwork(network)} prop in the Graph where I get the network object and save it to a local state. I also have an afterDrawing event that will trigger a network.focus(randomNode, focusSettings); after the graph has been finished painting to focus a random node.

The result is that I cannot longer interact with the graph after the focus event is fired (e.g. zoom in, zoom out) even if I set the locked prop to false. This is the focusSettings object:

const focusSettings = {
  scale: 3,
  locked: false,
  offset: {
    x: 0,
    y: 0,
  },
  animation: {
    duration: 1000,
    easingFunction: 'easeInOutQuad',
  },
};

Any idea on why I cannot interact with the graph afterwards the focus is executed? Thanks!

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

1 participant