处理canvas中的HTML 部分。
该配置项主要用来生成一个可视化的配置器
配置项必须包含在一个名为“configure”的对象中。
完整配置项预览
// these are all options in full.
var options = {
configure: {
enabled: true,
filter: 'nodes,edges',
container: undefined,
showButton: true
}
}
network.setOptions(options);
配置项详情
| 名称 | 类型 | 默认 | 说明 |
|---|---|---|---|
| enabled | Boolean | true | 打开或关闭配置界面。这是一个可选参数。如果此项未定义但是定义了configure的任何其他属性,则自动添加enabled: true。 |
| filter | String, Array, Boolean, Function | true | 当类型是Boolean,且为true时,所有的配置项均显示,false将不显示任何选项。 当类型为String或字符串数组,则允许以下任意组合:nodes, edges, layout, interaction, manipulation, physics, selection, renderer。 当类型为Function时,您将收到两个参数。配置项和配置项路径。如果返回true,则选项将显示在配置器中。 例子: //只显示物理模拟配置项 function (option, path) { return path.indexOf('physics') !== -1; } |
| container | DOM element | undefined | 配置器容器,默认放在关系图实例下面。 |
| showButton | Boolean | true | 在配置器底部显示生成配置项按钮。 |