Skip to content

Commit

Permalink
fix textpath refs on angular/firefox
Browse files Browse the repository at this point in the history
someone is breaking fragment references on angular/firefox
see dc-js/dc.js#1079 for more details
  • Loading branch information
gordonwoodhull committed Oct 23, 2017
1 parent 9d8dd8d commit c09bf02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/diagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,8 @@ dc_graph.diagram = function (parent, chartGroup) {
.attr('startOffset', '50%')
.attr('xlink:href', function(d) {
var id = _chart.textpathId(d);
return '#' + id;
// angular on firefox needs absolute paths for fragments
return window.location.href.split('#')[0] + '#' + id;
});
var textPaths = _defs.selectAll('path.edge-label-path')
.data(wedges, _chart.textpathId);
Expand Down

0 comments on commit c09bf02

Please sign in to comment.