mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Add highlighting of tasks in same module in taskoverview
and a docs-serve tox target
This commit is contained in:
parent
0276b70910
commit
be5590f411
3 changed files with 20 additions and 3 deletions
14
docs/_static/taskoverview.coffee
vendored
14
docs/_static/taskoverview.coffee
vendored
|
@ -118,15 +118,23 @@ class window.TaskOverview
|
||||||
.selectAll('line').data(layout.links()).enter()
|
.selectAll('line').data(layout.links()).enter()
|
||||||
.append('line').attr('marker-end', 'url(#right-arrowhead)')
|
.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')
|
nodes = @svg.append('g').attr('class', 'nodes')
|
||||||
.selectAll('g.partition').data(groups).enter()
|
.selectAll('g.partition').data(groups).enter()
|
||||||
.append('g').attr('class', 'partition')
|
.append('g').attr('class', 'partition')
|
||||||
.selectAll('circle').data((d) -> d.values).enter()
|
.selectAll('circle').data((d) -> d.values).enter()
|
||||||
.append('circle').attr('r', (d) -> d.radius)
|
.append('circle').attr('r', (d) -> d.radius)
|
||||||
.style('fill', (d, i) -> nodeColors(d[nodeColorKey]))
|
.style('fill', (d) -> nodeColors(d[nodeColorKey]))
|
||||||
.call(layout.drag)
|
.call(layout.drag)
|
||||||
.on('mouseover', (d) -> (labels.filter (l) -> d is l).classed 'hover', true)
|
.on('mouseover', mouseOver)
|
||||||
.on('mouseout', (d) -> (labels.filter (l) -> d is l).classed 'hover', false)
|
.on('mouseout', mouseOut)
|
||||||
|
|
||||||
labels = @svg.append('g').attr('class', 'node-labels')
|
labels = @svg.append('g').attr('class', 'node-labels')
|
||||||
.selectAll('g.partition').data(groups).enter()
|
.selectAll('g.partition').data(groups).enter()
|
||||||
|
|
5
docs/_static/taskoverview.less
vendored
5
docs/_static/taskoverview.less
vendored
|
@ -6,6 +6,11 @@
|
||||||
}
|
}
|
||||||
g.nodes circle {
|
g.nodes circle {
|
||||||
stroke: #000000;
|
stroke: #000000;
|
||||||
|
&.highlight {
|
||||||
|
stroke: #555599;
|
||||||
|
stroke-width: 2.5px;
|
||||||
|
fill: #EEAAAA !important;
|
||||||
|
}
|
||||||
opacity: .9;
|
opacity: .9;
|
||||||
stroke-width: 1.5px;
|
stroke-width: 1.5px;
|
||||||
}
|
}
|
||||||
|
|
4
tox.ini
4
tox.ini
|
@ -21,3 +21,7 @@ deps =
|
||||||
commands =
|
commands =
|
||||||
./taskoverview.py --output docs/_static/graph.json
|
./taskoverview.py --output docs/_static/graph.json
|
||||||
sphinx-build -b html -d docs/_build/html/doctrees docs docs/_build/html
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue