mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fixed regular expression for chrome
This commit is contained in:
parent
39551dac1f
commit
e74ab55be6
@ -313,7 +313,6 @@ html2canvas.prototype.drawBackground = function(el,bounds,ctx){
|
|||||||
background_image = this.backgroundImageUrl(background_image);
|
background_image = this.backgroundImageUrl(background_image);
|
||||||
var image = this.loadImage(background_image);
|
var image = this.loadImage(background_image);
|
||||||
|
|
||||||
|
|
||||||
var bgp = this.getBackgroundPosition(el,bounds,image),
|
var bgp = this.getBackgroundPosition(el,bounds,image),
|
||||||
bgy;
|
bgy;
|
||||||
|
|
||||||
@ -1006,7 +1005,7 @@ html2canvas.prototype.preloadImage = function(src){
|
|||||||
if (this.getIndex(this.images,src)==-1){
|
if (this.getIndex(this.images,src)==-1){
|
||||||
if (src.match(/data:image\/.*;base64,/i)) {
|
if (src.match(/data:image\/.*;base64,/i)) {
|
||||||
var img = new Image();
|
var img = new Image();
|
||||||
img.src = src.replace(/url\(['"]|['"]\)$/img, '');
|
img.src = src.replace(/url\(['"]{0,}|['"]{0,}\)$/ig, '');
|
||||||
this.images.push(src);
|
this.images.push(src);
|
||||||
this.images.push(img);
|
this.images.push(img);
|
||||||
this.imagesLoaded++;
|
this.imagesLoaded++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user