0

我正在使用以下软件包

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

你能告诉我如何停止放大和缩小所有节点吗

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

这是我的代码 https://stackblitz.com/edit/react-c9tnhw?file=index.js

const options = {
    layout: {
      hierarchical: false
    },
    edges: {
      color: "#F0E"
    },
    nodes: {
      fixed: true
    },
    height: "600px"
  };
4

1 回答 1

0

您的选项对象应如下所示:

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

所以只需添加:

    interaction: {
      zoomView: false
    }
于 2019-11-24T15:31:14.973 回答