X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5275794aec3e4d06292db57afe6ee2e742be7b0b..ce4a6eefa7405a3d23f722c987f0e22b966defc8:/app/assets/javascripts/openlayers.js.erb?ds=sidebyside diff --git a/app/assets/javascripts/openlayers.js.erb b/app/assets/javascripts/openlayers.js.erb index 6bd650a0d..206e7177f 100644 --- a/app/assets/javascripts/openlayers.js.erb +++ b/app/assets/javascripts/openlayers.js.erb @@ -28,6 +28,16 @@ OpenLayers.Util.imageURLs = { "img/zoom-world-mini.png": "<%= asset_path 'img/zoom-world-mini.png' %>" }; +OpenLayers.Util.origCreateDiv = OpenLayers.Util.createDiv; + +OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position, + border, overflow, opacity) { + imgURL = OpenLayers.Util.imageURLs[imgURL] || imgURL; + + return OpenLayers.Util.origCreateDiv(id, px, sz, imgURL, position, + border, overflow, opacity); +}; + OpenLayers.Util.origCreateImage = OpenLayers.Util.createImage; OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border, @@ -46,6 +56,6 @@ OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL, imgURL = OpenLayers.Util.imageURLs[imgURL] || imgURL; return OpenLayers.Util.origModifyAlphaImageDiv(div, id, px, sz, imgURL, - position, border, sizing, + position, border, sizing, opacity); };