仅在悬停时显示边缘
Show edges only on hover
我从 Gephi 导出到 Sigma.js 模板。我希望仅当您将鼠标悬停在节点上时才显示边缘。我在 network/config.json
中添加了这个,但它没有帮助:
"drawingProperties": {
**"drawEdges": false,**
"defaultEdgeType": "curve",
"defaultHoverLabelBGColor": "#002147",
"defaultLabelBGColor": "#ddd",
"activeFontStyle": "bold",
"defaultLabelColor": "#000",
"labelThreshold": 10,
"defaultLabelHoverColor": "#fff",
"fontStyle": "bold",
"hoverFontStyle": "bold",
"defaultLabelSize": 14
}
network/js/main.js
:
var a = sigma.init(document.getElementById("sigma-canvas")).drawingProperties(drawProps).graphProperties(graphProps).mouseProperties(mouseProps);
PS: 不知道javascript
我做到了
configProps={
drawEdges: false
};
var a = sigma.init(document.getElementById("sigma-canvas")).drawingProperties(drawProps).graphProperties(graphProps).mouseProperties(mouseProps).configProperties(configProps);
PS: 对js一窍不通
我从 Gephi 导出到 Sigma.js 模板。我希望仅当您将鼠标悬停在节点上时才显示边缘。我在 network/config.json
中添加了这个,但它没有帮助:
"drawingProperties": {
**"drawEdges": false,**
"defaultEdgeType": "curve",
"defaultHoverLabelBGColor": "#002147",
"defaultLabelBGColor": "#ddd",
"activeFontStyle": "bold",
"defaultLabelColor": "#000",
"labelThreshold": 10,
"defaultLabelHoverColor": "#fff",
"fontStyle": "bold",
"hoverFontStyle": "bold",
"defaultLabelSize": 14
}
network/js/main.js
:
var a = sigma.init(document.getElementById("sigma-canvas")).drawingProperties(drawProps).graphProperties(graphProps).mouseProperties(mouseProps);
PS: 不知道javascript
我做到了
configProps={
drawEdges: false
};
var a = sigma.init(document.getElementById("sigma-canvas")).drawingProperties(drawProps).graphProperties(graphProps).mouseProperties(mouseProps).configProperties(configProps);
PS: 对js一窍不通