Skip to content

network.focus locks manipulation and interaction #161

@sk8Guerra

Description

@sk8Guerra

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions