mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix rendering for safari 6
This commit is contained in:
parent
b9edf0b1c5
commit
2e2d722e3d
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "src/fabric"]
|
||||
path = src/fabric
|
||||
url = https://github.com/kangax/fabric.js.git
|
4
dist/html2canvas.js
vendored
4
dist/html2canvas.js
vendored
@ -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;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
4
dist/html2canvas.min.js
vendored
4
dist/html2canvas.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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
1
src/fabric
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 791c74a82ef0d838fd0bd81bf942f8630a9a4a8f
|
1
src/fabric.js
Submodule
1
src/fabric.js
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 791c74a82ef0d838fd0bd81bf942f8630a9a4a8f
|
Loading…
Reference in New Issue
Block a user