fix background size with 1-part image

This commit is contained in:
Christophe Serafin committed 2014-08-12 17:26:43 -07:00
1 parent 712dc493ca
commit bf5b660cb5
1 file changed
+6
+6
View File
@@ -1805,6 +1805,9 @@ var CPViewFlags = { },
_DOMElement.style.background = "";
_DOMImageParts[0].style.background = [_backgroundColor cssString];
if (patternImage)
_DOMImageParts[0].style.backgroundSize = [patternImage size].width + "px " + [patternImage size].height + "px";
if (CPFeatureIsCompatible(CPOpacityRequiresFilterFeature))
_DOMImageParts[0].style.filter = "alpha(opacity=" + [_backgroundColor alphaComponent] * 100 + ")";
else
@@ -1815,6 +1818,9 @@ var CPViewFlags = { },
}
else
_DOMElement.style.background = colorCSS;
if (patternImage)
_DOMElement.style.backgroundSize = [patternImage size].width + "px " + [patternImage size].height + "px";
}
else
{