summaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'script.js')
-rw-r--r--script.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/script.js b/script.js
index 0c04ea5..930f594 100644
--- a/script.js
+++ b/script.js
@@ -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);