Yep, detecting opera.

Goal can be achieved with two different svg styles,
but Opera only implements one, Firefox the other. Can't
apply both because Chrome implements both.
This commit is contained in:
Ansis Brammanis
2013-02-11 12:36:21 -05:00
parent fc6cb352d8
commit fe32ca9d03
3 changed files with 10 additions and 0 deletions

View File

@@ -648,7 +648,13 @@ text.pointlabel {
}
.pathlabel .textpath {
dominant-baseline: middle;
}
/* Opera doesn't support dominant-baseline */
.opera .pathlabel .textpath {
baseline-shift: -33%;
dominant-baseline: auto;
}
.pointlabel-halo,

View File

@@ -127,6 +127,8 @@ iD.detect = function() {
browser.support = true;
}
browser.opera = ua.indexOf('Opera') >= 0;
browser.locale = navigator.language;
function nav(x) {

View File

@@ -12,6 +12,8 @@ iD.ui = function(context) {
return;
}
if (iD.detect().opera) container.classed('opera', true);
function hintprefix(x, y) {
return '<span>' + y + '</span>' + '<div class="keyhint-wrap"><span class="keyhint"> ' + x + '</span></div>';
}