Avoiding unnecessary repeated checks of navigator.userAgent. The constants added here should not be used outside the library. In the future, they should be removed from the library. r=ahocevar (closes #2911)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10868 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -49,12 +49,6 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
*/
|
||||
symbolMetrics: null,
|
||||
|
||||
/**
|
||||
* Property: isGecko
|
||||
* {Boolean}
|
||||
*/
|
||||
isGecko: null,
|
||||
|
||||
/**
|
||||
* Property: supportUse
|
||||
* {Boolean} true if defs/use is supported - known to not work as expected
|
||||
@@ -77,7 +71,6 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
arguments);
|
||||
this.translationParameters = {x: 0, y: 0};
|
||||
this.supportUse = (navigator.userAgent.toLowerCase().indexOf("applewebkit/5") == -1);
|
||||
this.isGecko = (navigator.userAgent.toLowerCase().indexOf("gecko/") != -1);
|
||||
|
||||
this.symbolMetrics = {};
|
||||
},
|
||||
@@ -735,7 +728,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
||||
label.setAttributeNS(null, "text-anchor",
|
||||
OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]] || "middle");
|
||||
|
||||
if (this.isGecko) {
|
||||
if (OpenLayers.IS_GECKO === true) {
|
||||
label.setAttributeNS(null, "dominant-baseline",
|
||||
OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]] || "central");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user