Changeset - 91002a3366f4
[Not reviewed]
Dennis Fink - 9 years ago 2016-03-01 23:16:27
dennis.fink@c3l.lu
Country names in bold
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
ennstatus/static/js/worldmap.js
Show inline comments
 
@@ -108,25 +108,25 @@ function draw(topo) {
 
			var mouse = d3.mouse(svg.node()).map(function(d) { return parseInt(d); });
 

	
 
			tooltip.classed("hidden", false)
 
				.attr("style", "left:"+(mouse[0]+40)+"px;top:"+mouse[1]+"px")
 
				.html(function() {
 
					if (d.properties.name in data) {
 
						var text = d.properties.name + "<br>Total servers: " + data[d.properties.name]['total']
 
						var text = "<b>" + d.properties.name + "</b>" + "<br>Total servers: " + data[d.properties.name]['total']
 
						if ('bridge' in data[d.properties.name]) {
 
							text = text + "<br>Bridge servers: " + data[d.properties.name]['bridge']
 
						}
 
						if ('exit' in data[d.properties.name]) {
 
							text = text + "<br>Exit servers: " + data[d.properties.name]['exit']
 
						}
 
						if ('relay' in data[d.properties.name]) {
 
							text = text + "<br>Relay server: " + data[d.properties.name]['relay']
 
						}
 
						return text
 
					} else {
 
						return d.properties.name
 
						return "<b>" + d.properties.name + "</b>"
 
					}
 
				})
 
		})
 
		.on("mouseout", function(d, i) {
 
			tooltip.classed("hidden", true);
 
		});
0 comments (0 inline, 0 general)