[tor-bugs] #21351 [Metrics/Atlas]: SVG images on detail pages have duplicate id attributes to the divs
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Jan 30 20:17:30 UTC 2017
#21351: SVG images on detail pages have duplicate id attributes to the divs
---------------------------+---------------------
Reporter: irl | Owner: irl
Type: defect | Status: new
Priority: Low | Milestone:
Component: Metrics/Atlas | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: #21274 | Points:
Reviewer: | Sponsor:
---------------------------+---------------------
Comment (by 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.
{{{
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)
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21351#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list