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

[tor-commits] [atlas/master] Makes graphs responsive (#23276)



commit 9ee2b50672902bb699c235fc1bda59aace18ebb6
Author: Iain R. Learmonth <irl@xxxxxxxx>
Date:   Tue Nov 14 16:51:04 2017 +0000

    Makes graphs responsive (#23276)
---
 css/atlas.css            | 5 -----
 js/views/details/main.js | 3 +--
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/css/atlas.css b/css/atlas.css
index f26fa7d..7875246 100644
--- a/css/atlas.css
+++ b/css/atlas.css
@@ -1,8 +1,3 @@
-.graph {
-    width: 550px;
-    height: 362px;
-}
-
 .progress {
     width: 50%;
     margin: 100px auto;
diff --git a/js/views/details/main.js b/js/views/details/main.js
index b56f7a7..059fbd6 100644
--- a/js/views/details/main.js
+++ b/js/views/details/main.js
@@ -33,8 +33,7 @@ define([
             var svg = d3.select("#" + g).append("svg:svg")
                 .attr("version", 1.1)
                 .attr("xmlns", "http://www.w3.org/2000/svg";)
-                .attr("width", width + margin.left + margin.right)
-                .attr("height", height + margin.top + margin.bottom)
+                .attr("viewBox", "0 0 550 342")
                 .append("g")
                 .attr("transform",
                     "translate(" + margin.left + "," + margin.top + ")");

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