Igor a610223309 Improve student view | 5 år sedan | |
---|---|---|
.. | ||
README.md | 5 år sedan | |
settings.js | 5 år sedan | |
sigma.canvas.edges.labels.curve.js | 5 år sedan | |
sigma.canvas.edges.labels.curvedArrow.js | 5 år sedan | |
sigma.canvas.edges.labels.def.js | 5 år sedan |
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
.