mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix bug in WebKitGTK+, backgroundRepeat return "wrong" values
This commit is contained in:
parent
1d4b1753d6
commit
0b213eecef
@ -250,6 +250,13 @@ _html2canvas.Util.getCSS = function (element, attribute, index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var value = computedCSS[attribute];
|
var value = computedCSS[attribute];
|
||||||
|
if(attribute==="backgroundRepeat" && value.indexOf(" ")!==-1){
|
||||||
|
value = (
|
||||||
|
"no-repeat repeat"===value ? "repeat-y" : (
|
||||||
|
"repeat no-repeat"===value ? "repeat-x" : value
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (/^background(Size|Position)$/.test(attribute)) {
|
if (/^background(Size|Position)$/.test(attribute)) {
|
||||||
return parseBackgroundSizePosition(value, element, attribute, index);
|
return parseBackgroundSizePosition(value, element, attribute, index);
|
||||||
@ -406,4 +413,4 @@ _html2canvas.Util.Children = function( elem ) {
|
|||||||
|
|
||||||
_html2canvas.Util.isTransparent = function(backgroundColor) {
|
_html2canvas.Util.isTransparent = function(backgroundColor) {
|
||||||
return (!backgroundColor || backgroundColor === "transparent" || backgroundColor === "rgba(0, 0, 0, 0)");
|
return (!backgroundColor || backgroundColor === "transparent" || backgroundColor === "rgba(0, 0, 0, 0)");
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user