Add highlighting of tasks in same module in taskoverview

and a docs-serve tox target
This commit is contained in:
Anders Ingemann 2015-04-11 15:06:41 +02:00
parent 0276b70910
commit be5590f411
3 changed files with 20 additions and 3 deletions

View file

@ -118,15 +118,23 @@ class window.TaskOverview
.selectAll('line').data(layout.links()).enter()
.append('line').attr('marker-end', 'url(#right-arrowhead)')
mouseOver = (d) ->
labels.classed 'hover', (l) -> d is l
nodes.classed 'highlight', (n) -> d.module is n.module
mouseOut = (d) ->
labels.classed 'hover', no
nodes.classed 'highlight', no
nodes = @svg.append('g').attr('class', 'nodes')
.selectAll('g.partition').data(groups).enter()
.append('g').attr('class', 'partition')
.selectAll('circle').data((d) -> d.values).enter()
.append('circle').attr('r', (d) -> d.radius)
.style('fill', (d, i) -> nodeColors(d[nodeColorKey]))
.style('fill', (d) -> nodeColors(d[nodeColorKey]))
.call(layout.drag)
.on('mouseover', (d) -> (labels.filter (l) -> d is l).classed 'hover', true)
.on('mouseout', (d) -> (labels.filter (l) -> d is l).classed 'hover', false)
.on('mouseover', mouseOver)
.on('mouseout', mouseOut)
labels = @svg.append('g').attr('class', 'node-labels')
.selectAll('g.partition').data(groups).enter()

View file

@ -6,6 +6,11 @@
}
g.nodes circle {
stroke: #000000;
&.highlight {
stroke: #555599;
stroke-width: 2.5px;
fill: #EEAAAA !important;
}
opacity: .9;
stroke-width: 1.5px;
}

View file

@ -21,3 +21,7 @@ deps =
commands =
./taskoverview.py --output docs/_static/graph.json
sphinx-build -b html -d docs/_build/html/doctrees docs docs/_build/html
[testenv:docs-serve]
changedir = docs/_build/html
commands = python -m SimpleHTTPServer 8080