Fix webkit-gradient() parsing

This commit is contained in:
Niklas von Hertzen
2013-01-11 20:31:34 +02:00
parent 861a18f977
commit 2bb926c7d0
3 changed files with 9 additions and 9 deletions

View File

@ -139,16 +139,15 @@ _html2canvas.Preload = function( options ) {
src = background_image.args[0];
methods.loadImage(src);
} else if( background_image.method.match( /\-gradient$/ ) ) {
} else if( background_image.method.match( /\-?gradient$/ ) ) {
if(bounds === undefined) {
bounds = _html2canvas.Util.Bounds( el );
}
var key = background_image.value + '/' + el.__html2canvas__id + '/' + imageIndex;
img = _html2canvas.Generate.Gradient( background_image.value, bounds);
if ( img !== undefined ){
images[ key ] = {
images[background_image.value] = {
img: img,
succeeded: true
};