diff options
author | James Nylen <jnylen@gmail.com> | 2014-09-16 07:40:24 -0500 |
---|---|---|
committer | James Nylen <jnylen@gmail.com> | 2014-09-16 07:40:24 -0500 |
commit | 9cc4ab7abfb0a3a9c921d51570903fc2640044df (patch) | |
tree | 7f4578e9b1ee8ce5e112240ab299e79b16115916 /script.js | |
parent | 11da1623d8ae40dc435c3a3098342beb1ffb2a59 (diff) | |
download | d3-process-map-origin/fix-ie-markers.zip d3-process-map-origin/fix-ie-markers.tar.gz d3-process-map-origin/fix-ie-markers.tar.bz2 |
Work around IE bug regarding paths with markersorigin/fix-ie-markers
Fixes #6.
Diffstat (limited to 'script.js')
-rw-r--r-- | script.js | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,10 +1,13 @@ var graph = {}, selected = {}, - highlighted = null; + highlighted = null, + isIE = false; $(function() { resize(); + isIE = $.browser.msie; + d3.json(config.jsonUrl, function(data) { if (data.errors.length) { alert('Data error(s):\n\n' + data.errors.join('\n')); @@ -497,6 +500,12 @@ function tick(e) { return d.source.y; }) .each(function(d) { + if (isIE) { + // Work around IE bug regarding paths with markers + // Credit: #6 and http://stackoverflow.com/a/18475039/106302 + this.parentNode.insertBefore(this, this); + } + var x = d.target.x, y = d.target.y, line = new geo.LineSegment(d.source.x, d.source.y, x, y); |