git ssb

2+

dinoworm ๐Ÿ› / ssb-graphviz



Tree: 915c479a5dddab0aacc02f7e0f910c9154e48806

Files: 915c479a5dddab0aacc02f7e0f910c9154e48806 / renderer.js

491 bytesRaw
1const Renderer = require('ngraph.pixel')
2
3module.exports = createRenderer
4
5function createRenderer (graph, config) {
6 var display = Renderer(graph, config)
7
8 display.on('nodehover', handleNodeHover)
9
10 return display
11
12 function handleNodeHover (node) {
13 if (node === undefined) return
14
15 node.links
16 .map(link => display.getLink(link.id))
17 .forEach(linkUI => {
18 const color = 0x80ffffff
19 linkUI.fromColor = color
20 linkUI.toColor = color
21 })
22 }
23}
24

Built with git-ssb-web