mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Fix oneway markers in IE
This commit is contained in:
+1
-6
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
@@ -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')
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user