Igor a610223309 Improve student view | 5 лет назад | |
---|---|---|
.. | ||
README.md | 5 лет назад | |
settings.js | 5 лет назад | |
sigma.canvas.edges.labels.curve.js | 5 лет назад | |
sigma.canvas.edges.labels.curvedArrow.js | 5 лет назад | |
sigma.canvas.edges.labels.def.js | 5 лет назад |
Plugin developed by Sébastien Heymann for Linkurious.
Contact: seb@linkurio.us
This plugin displays edge labels.
See the following example for full usage.
To use it, include all .js files under this folder.
This plugin extends Sigma.js settings in a transparent way to render edge labels, see settings.js:
defaultEdgeLabelColor
#000
defaultEdgeLabelActiveColor
rgb(236, 81, 72)
defaultEdgeLabelSize
10
edgeLabelSize
fixed
fixed
, proportional
edgeLabelSizePowRatio
0.8
// Formula:
Math.pow(size, - 1 / edgeLabelSizePowRatio) * size * defaultEdgeLabelSize
1
The plugin also forces drawEdgeLabels
to true
.
The default values provided by the plugin may be overridden when instantiating Sigma, e.g.:
var sigInst = new sigma({
container: 'graph-container',
settings: {
edgeLabelSize: 'proportional'
}
});
This plugin provides the following edge label renderers:
line
(default)arrow
(use default)curve
curvedArrow
This plugin is compatible with sigma.plugins.activeState
.