[Mapbender-commits] r8104 - branches/2.7/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Sep 6 02:51:25 EDT 2011


Author: verenadiewald
Date: 2011-09-05 23:51:25 -0700 (Mon, 05 Sep 2011)
New Revision: 8104

Modified:
   branches/2.7/http/javascripts/geometry.js
Log:
set tmp img for getting icon width and height for IE

Modified: branches/2.7/http/javascripts/geometry.js
===================================================================
--- branches/2.7/http/javascripts/geometry.js	2011-09-06 06:51:07 UTC (rev 8103)
+++ branches/2.7/http/javascripts/geometry.js	2011-09-06 06:51:25 UTC (rev 8104)
@@ -2031,10 +2031,14 @@
 				node = img.node;
 			}
 			else {
-				var $img = $('<img src="'+url+'" />');
-				var width = $img.attr('width')||19;
-				var height = $img.attr('height')||34;
-				var img = canvas.image(url, newImgLeft, newImgTop, width, height);
+                                //append tmp img to body to get img width and height for IE
+                                var $tmpImg = $("body").append('<img style="visibility:hidden;" id="tmpImg" src="'+url+'" />');
+                                var $img = $('<img src="'+url+'" />');
+                                var width = $("#tmpImg").attr('width')||19;
+                                var height = $("#tmpImg").attr('height')||34;
+                                //remove tmp img
+                                $("#tmpImg").remove();
+                                var img = canvas.image(url, newImgLeft, newImgTop, width, height);
 				node = img.node;
 				
 			}



More information about the Mapbender_commits mailing list