0

I am using the below package

https://www.npmjs.com/package/react-graph-vis

could you please tell me how to stop zoom in and zoom out of all nodes

https://stackblitz.com/edit/react-c9tnhw?file=index.js

here is my code https://stackblitz.com/edit/react-c9tnhw?file=index.js

const options = {
    layout: {
      hierarchical: false
    },
    edges: {
      color: "#F0E"
    },
    nodes: {
      fixed: true
    },
    height: "600px"
  };
user944513
  • 12,247
  • 49
  • 168
  • 318

1 Answers1

0

Your options object should look like:

const options = {
    layout: {
      hierarchical: false
    },
    edges: {
      color: "#F0E"
    },
    height: "600px",
    interaction: {
      zoomView: false
    },
  };

So just add:

    interaction: {
      zoomView: false
    }