Merge pull request #188 from felfert/master

Fetch images of current element only
This commit is contained in:
Niklas von Hertzen 2013-04-07 10:52:26 -07:00
commit a5d74bcfd9
2 changed files with 4 additions and 4 deletions

View File

@ -759,7 +759,7 @@ _html2canvas.Parse = function (images, options) {
function getPseudoElement(el, which) {
var elStyle = window.getComputedStyle(el, which);
if(!elStyle || !elStyle.content || elStyle.content === "none" || elStyle.content === "-moz-alt-content") {
if(!elStyle || !elStyle.content || elStyle.content === "none" || elStyle.content === "-moz-alt-content" || elStyle.display === "none") {
return;
}
var content = elStyle.content + '',

View File

@ -12,7 +12,7 @@ _html2canvas.Preload = function( options ) {
count = 0,
element = options.elements[0] || document.body,
doc = element.ownerDocument,
domImages = doc.images, // TODO probably should limit it to images present in the element only
domImages = element.getElementsByTagName('img'), // Fetch images of the present element only
imgLen = domImages.length,
link = doc.createElement("a"),
supportCORS = (function( img ){