Fix rendering for safari 6

This commit is contained in:
Niklas von Hertzen 2014-09-04 19:29:42 +03:00
parent b9edf0b1c5
commit 2e2d722e3d
6 changed files with 13 additions and 4 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "src/fabric"]
path = src/fabric
url = https://github.com/kangax/fabric.js.git

4
dist/html2canvas.js vendored
View File

@ -77,10 +77,12 @@ function renderDocument(document, options, windowWidth, windowHeight) {
var parser = new NodeParser(node, renderer, support, imageLoader, options);
return parser.ready.then(function() {
log("Finished rendering");
var canvas = (options.type !== "view" && (node === clonedWindow.document.body || node === clonedWindow.document.documentElement)) ? renderer.canvas : crop(renderer.canvas, bounds);
if (options.removeContainer) {
container.parentNode.removeChild(container);
log("Cleaned up container");
}
return (options.type !== "view" && (node === clonedWindow.document.body || node === clonedWindow.document.documentElement)) ? renderer.canvas : crop(renderer.canvas, bounds);
return canvas;
});
});
}

File diff suppressed because one or more lines are too long

View File

@ -38,10 +38,12 @@ function renderDocument(document, options, windowWidth, windowHeight) {
var parser = new NodeParser(node, renderer, support, imageLoader, options);
return parser.ready.then(function() {
log("Finished rendering");
var canvas = (options.type !== "view" && (node === clonedWindow.document.body || node === clonedWindow.document.documentElement)) ? renderer.canvas : crop(renderer.canvas, bounds);
if (options.removeContainer) {
container.parentNode.removeChild(container);
log("Cleaned up container");
}
return (options.type !== "view" && (node === clonedWindow.document.body || node === clonedWindow.document.documentElement)) ? renderer.canvas : crop(renderer.canvas, bounds);
return canvas;
});
});
}

1
src/fabric Submodule

@ -0,0 +1 @@
Subproject commit 791c74a82ef0d838fd0bd81bf942f8630a9a4a8f

1
src/fabric.js Submodule

@ -0,0 +1 @@
Subproject commit 791c74a82ef0d838fd0bd81bf942f8630a9a4a8f