如何在sigma.js中进行edgehovering?

时间:2015-05-14 10:53:04

标签: sigma.js

我使用过enableEdgeHovering: true但仍然悬停不起作用?我想仅在悬停其他隐藏边缘标签时显示标签

1 个答案:

答案 0 :(得分:0)

s = new sigma({
          graph: json,
          renderer: {
            container: document.getElementById('graph-container'),
            type: 'canvas'
          },
          settings: {
            animationsTime: 1000,
            borderSize: 2,
            outerBorderSize: 3,
            defaultNodeOuterBorderColor: 'rgb(236, 81, 72)',
            enableEdgeHovering: true,
            edgeHoverHighlightNodes: 'circle',
            sideMargin: 1,
            edgeHoverColor: 'edge',
            defaultEdgeHoverColor: '#000',
            edgeHoverSizeRatio: 1,
            edgeHoverExtremities: true,
            scalingMode: 'outside' 
          }
        });

使用上面的代码段,这将为您提供所需的精确输出。