[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [atlas/master] Makes countries clickable in the map view



commit bbb068896971d3b5b9747bdfacbd62ae634be9b9
Author: Iain R. Learmonth <irl@xxxxxxxx>
Date:   Fri Jan 12 01:06:37 2018 +0000

    Makes countries clickable in the map view
---
 js/views/aggregate/map.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/js/views/aggregate/map.js b/js/views/aggregate/map.js
index fce1e61..2141783 100644
--- a/js/views/aggregate/map.js
+++ b/js/views/aggregate/map.js
@@ -140,6 +140,7 @@ define([
             .style("fill", function(d) { return (getCountryFillOpacity(d.id, aggregate_property) > 0) ? "#7d4698" : "#68b030"; })
             .style("fill-opacity", function(d) { return Math.abs(getCountryFillOpacity(d.id, aggregate_property)); })
             .attr("d", path)
+            .on("click", function(d) { window.location = "#aggregate/cc/country:" + d.id.toLowerCase(); })
           .append("svg:title")
             .text( function(d) { return getCountryTooltip(d.id, aggregate_property); });
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits