Wrap another OpenLayers image creation routine
authorTom Hughes <tom@compton.nu>
Sat, 26 Nov 2011 00:07:45 +0000 (00:07 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 26 Nov 2011 00:07:45 +0000 (00:07 +0000)
app/assets/javascripts/openlayers.js.erb

index 6a027d59be6d1684449b4761fa6fc111b1132577..6bd650a0db16aafa397db699815a5167faf252a9 100644 (file)
@@ -37,3 +37,15 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
     return OpenLayers.Util.origCreateImage(id, px, sz, imgURL, position,
                                            border, opacity, delayDisplay);
 };
+
+OpenLayers.Util.origModifyAlphaImageDiv = OpenLayers.Util.modifyAlphaImageDiv;
+
+OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL, 
+                                               position, border, sizing, 
+                                               opacity) {
+    imgURL = OpenLayers.Util.imageURLs[imgURL] || imgURL;
+
+    return OpenLayers.Util.origModifyAlphaImageDiv(div, id, px, sz, imgURL, 
+                                               position, border, sizing, 
+                                                   opacity);
+};