diff --git a/css/app.css b/css/app.css index 7a8269395..247fab1b5 100644 --- a/css/app.css +++ b/css/app.css @@ -206,6 +206,10 @@ table.tags, table.tags td, table.tags th { padding: 4px; } +::-ms-clear { + display: none; +} + /* Grid ------------------------------------------------------- */ diff --git a/css/map.css b/css/map.css index 4a371b7a9..4f27b635a 100644 --- a/css/map.css +++ b/css/map.css @@ -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; } diff --git a/dist/index.html b/dist/index.html index a00ac7b06..b3e7c19e3 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,7 +1,6 @@ - iD @@ -36,8 +35,8 @@ a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0013/6714.js?"+Math.floor(new Date().getTime()/3600000); a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1); - if (typeof iD == 'undefined') { - document.getElementById('id-container').innerHTML = 'Sorry, Internet Explorer is not currently supported. Please use Potlatch 2 to edit the map.'; + if (typeof iD == 'undefined' || !iD.detect().support) { + document.getElementById('id-container').innerHTML = 'Sorry, your browser is not currently supported. Please use Potlatch 2 to edit the map.'; document.getElementById('id-container').className = 'unsupported'; } else { var id = iD() diff --git a/img b/img new file mode 120000 index 000000000..aab814b92 --- /dev/null +++ b/img @@ -0,0 +1 @@ +dist/img \ No newline at end of file diff --git a/index.html b/index.html index 24410198f..42522a2bf 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,6 @@ - iD diff --git a/js/id/id.js b/js/id/id.js index bcc7f96e2..401a2e3ee 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -341,10 +341,17 @@ iD.version = '1.8.0'; var ua = navigator.userAgent, m = null; - m = ua.match(/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i); // IE11+ + m = ua.match(/(edge)\/?\s*(\.?\d+(\.\d+)*)/i); // Edge if (m !== null) { - detected.browser = 'msie'; - detected.version = m[1]; + detected.browser = m[1]; + detected.version = m[2]; + } + if (!detected.browser) { + m = ua.match(/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i); // IE11 + if (m !== null) { + detected.browser = 'msie'; + detected.version = m[1]; + } } if (!detected.browser) { m = ua.match(/(opr)\/?\s*(\.?\d+(\.\d+)*)/i); // Opera 15+ @@ -371,9 +378,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; + detected.support = parseFloat(detected.version) >= 11; } else { + detected.ie = false; detected.support = true; } diff --git a/js/id/svg/defs.js b/js/id/svg/defs.js index a9a5660f3..03054e377 100644 --- a/js/id/svg/defs.js +++ b/js/id/svg/defs.js @@ -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') diff --git a/js/id/svg/lines.js b/js/id/svg/lines.js index 30a6aaf7b..474057fd1 100644 --- a/js/id/svg/lines.js +++ b/js/id/svg/lines.js @@ -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();