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

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

Submodule src/fabric added at 791c74a82e

1
src/fabric.js Submodule

Submodule src/fabric.js added at 791c74a82e