projects
/
tech-radar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
a49b02e
)
Merge pull request #13 from br00k/blip-hover
author
Bruno Trecenti
<bruno.lopestrecenti@gmail.com>
Mon, 24 Aug 2015 13:46:32 +0000
(10:46 -0300)
committer
Bruno Trecenti
<bruno.lopestrecenti@gmail.com>
Mon, 24 Aug 2015 13:46:32 +0000
(10:46 -0300)
Add tooltips to Blips
src/graphing/radar.js
patch
|
blob
|
history
diff --git
a/src/graphing/radar.js
b/src/graphing/radar.js
index
4265b2a
..
46c43ae
100644
(file)
--- a/
src/graphing/radar.js
+++ b/
src/graphing/radar.js
@@
-1,4
+1,4
@@
-tr.graphing.Radar = function (size, radar) {
+tr.graphing.Radar = function (size, radar
, toolTipDescription
) {
var self, fib, svg;
fib = new tr.util.Fib();
@@
-132,6
+132,10
@@
tr.graphing.Radar = function (size, radar) {
.attr('class', 'blip-text')
.attr('text-anchor', 'middle')
.text(blip.number())
+ .append("svg:title")
+ .text(blip.name() + ((toolTipDescription && blip.description())
+ ? ': ' + blip.description().replace(/(<([^>]+)>)/ig, '')
+ : '' ))
});
});
};