Ticket #1520: modifyalphaimagediv.patch
| File modifyalphaimagediv.patch, 2.3 kB (added by openlayers, 7 months ago) |
|---|
-
tests/Util.html
old new 400 400 } 401 401 402 402 function test_Util_modifyAlphaImageDiv(t) { 403 t.plan( 19);403 t.plan( 20 ); 404 404 405 405 var imageDiv = OpenLayers.Util.createAlphaImageDiv(); 406 406 … … 460 460 461 461 if (OpenLayers.Util.alphaHack()) { 462 462 463 t.eq(imageDiv.style.display, "inline-block", "imageDiv.style.display set correctly");464 465 463 var filter = "progid:DXImageTransform.Microsoft" + 466 464 ".AlphaImageLoader(src='" + img + "', " + 467 465 "sizingMethod='" + sizing + "') alpha(opacity=" + opacity *100 + ")"; … … 476 474 t.ok(true, "image filter value not set (not in IE)"); 477 475 } 478 476 477 var imageDiv = OpenLayers.Util.createAlphaImageDiv(); 478 var display = "none"; 479 imageDiv.style.display = display; 480 OpenLayers.Util.modifyAlphaImageDiv(imageDiv, id, xy, sz, img, position, border, sizing, opacity); 481 t.eq(imageDiv.style.display, display, "imageDiv.style.display set correctly, if 'none'"); 482 483 var imageDiv = OpenLayers.Util.createAlphaImageDiv(); 484 var display = "block"; 485 imageDiv.style.display = display; 486 OpenLayers.Util.modifyAlphaImageDiv(imageDiv, id, xy, sz, img, position, border, sizing, opacity); 487 t.eq(imageDiv.style.display, "inline-block", "imageDiv.style.display set correctly, if not 'none'"); 488 489 490 479 491 var imageDiv = OpenLayers.Util.createAlphaImageDiv(id, xy, sz, img, position, border, "scale", opacity); 480 492 if (OpenLayers.Util.alphaHack()) { 481 493 var filter = "progid:DXImageTransform.Microsoft" + -
lib/OpenLayers/Util.js
old new 428 428 "relative", border); 429 429 430 430 if (OpenLayers.Util.alphaHack()) { 431 432 div.style.display = "inline-block"; 431 if(div.style.display != "none") { 432 div.style.display = "inline-block"; 433 } 433 434 if (sizing == null) { 434 435 sizing = "scale"; 435 436 }
