[tor-commits] [atlas/master] Removes duplicate id attributes on SVG graphs (Fixes: #21351)

irl at torproject.org irl at torproject.org
Tue Jan 31 00:18:28 UTC 2017


commit 849712efdf623af8cfcde73bc0a44ad2b70a4e96
Author: Iain R. Learmonth <irl at fsfe.org>
Date:   Tue Jan 31 00:16:43 2017 +0000

    Removes duplicate id attributes on SVG graphs (Fixes: #21351)
    
    Comment from cypherpunks: "A quick grep shows there is no CSS that uses the
    bw_month id. The id is only used by the JS code that generates the SVG graphs
    to know where to inject the graphs. This code also injects the duplicate id for
    some unknown reason. The inline patch fixes the issue by simply removing the
    injection of the duplicate id."
    
    I would agree with this comment.
---
 js/views/details/main.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/js/views/details/main.js b/js/views/details/main.js
index e73ac4a..97846be 100644
--- a/js/views/details/main.js
+++ b/js/views/details/main.js
@@ -32,7 +32,6 @@ define([
                 width = 550 - margin.left - margin.right,
                 height = 342 - margin.top - margin.bottom;
             var svg = d3.select("#" + g).append("svg:svg")
-                .attr("id", g)
                 .attr("version", 1.1)
                 .attr("xmlns", "http://www.w3.org/2000/svg")
                 .attr("width", width + margin.left + margin.right)



More information about the tor-commits mailing list