Fix opacity in oldie for the millionth time. Refs #1486

This commit is contained in:
danzel 2013-03-05 09:47:46 +13:00
parent 224810af32
commit 0b0cce929e

View File

@ -152,7 +152,12 @@ L.DomUtil = {
filterName = 'DXImageTransform.Microsoft.Alpha';
// filters collection throws an error if we try to retrieve a filter that doesn't exist
try { filter = el.filters.item(filterName); } catch (e) {}
try {
filter = el.filters.item(filterName);
} catch (e) {
//Don't set opacity to 1 if we haven't already set an opacity, it isn't needed and breaks transparent pngs.
if (value === 1) { return; }
}
value = Math.round(value * 100);