Fix oneway markers in IE

This commit is contained in:
Bryan Housel
2015-11-26 01:11:46 -05:00
parent 9d8eba6e1d
commit 16ca10708b
4 changed files with 13 additions and 7 deletions
+1 -6
View File
@@ -24,7 +24,7 @@ img.tile-removing {
use { pointer-events: none; }
/* base styles */
.layer path { fill: none; }
.layer path:not(.oneway) { fill: none; }
.layer use path { fill: #333; } /* FF svg icons */
g.point .shadow,
@@ -1290,11 +1290,6 @@ text {
fill: #002F35;
}
marker#oneway-marker path {
fill:#000;
opacity: .5;
}
path.oneway {
stroke-width: 6px;
}
+2
View File
@@ -371,9 +371,11 @@ iD.version = '1.8.0';
detected.version = detected.version.split(/\W/).slice(0,2).join('.');
if (detected.browser.toLowerCase() === 'msie') {
detected.ie = true;
detected.browser = 'Internet Explorer';
detected.support = parseFloat(detected.version) > 9;
} else {
detected.ie = false
detected.support = true;
}
+6 -1
View File
@@ -27,10 +27,15 @@ iD.svg.Defs = function(context) {
refX: 5,
markerWidth: 2,
markerHeight: 2,
markerUnits: 'strokeWidth',
orient: 'auto'
})
.append('path')
.attr('d', 'M 5 3 L 0 3 L 0 2 L 5 2 L 5 0 L 10 2.5 L 5 5 z');
.attr('class', 'oneway')
.attr('d', 'M 5 3 L 0 3 L 0 2 L 5 2 L 5 0 L 10 2.5 L 5 5 z')
.attr('stroke', 'none')
.attr('fill', '#000')
.attr('opacity', '0.5');
// patterns
var patterns = defs.selectAll('pattern')
+4
View File
@@ -117,6 +117,10 @@ iD.svg.Lines = function(projection) {
oneways
.attr('d', function(d) { return d.d; });
if (iD.detect().ie) {
oneways.each(function() { this.parentNode.insertBefore(this, this); });
}
oneways.exit()
.remove();