Merge pull request #5811 from fredj/use_ol.global
Use ol.global.getComputedStyle instead of window.getComputedStyle
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ ol.color.fromNamed = function(color) {
|
|||||||
var el = document.createElement('div');
|
var el = document.createElement('div');
|
||||||
el.style.color = color;
|
el.style.color = color;
|
||||||
document.body.appendChild(el);
|
document.body.appendChild(el);
|
||||||
var rgb = window.getComputedStyle(el).color;
|
var rgb = ol.global.getComputedStyle(el).color;
|
||||||
document.body.removeChild(el);
|
document.body.removeChild(el);
|
||||||
return rgb;
|
return rgb;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user