From 4aeceabc2b1d7252067b24b333222534a4b3ab09 Mon Sep 17 00:00:00 2001 From: MoyuScript Date: Fri, 5 Apr 2013 18:06:37 +0200 Subject: [PATCH 1/2] - Fetch images of current element only --- src/Preload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Preload.js b/src/Preload.js index 8d0ad4b..9fb176a 100644 --- a/src/Preload.js +++ b/src/Preload.js @@ -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 ){ @@ -327,4 +327,4 @@ _html2canvas.Preload = function( options ) { return methods; -}; \ No newline at end of file +}; From 2632d11084e484d95aac779125869e2bcc69d912 Mon Sep 17 00:00:00 2001 From: MoyuScript Date: Sat, 6 Apr 2013 00:30:16 +0200 Subject: [PATCH 2/2] - Fixed rendering of ExtJS 4.2 windows. --- src/Parse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Parse.js b/src/Parse.js index 7b14096..7229af7 100644 --- a/src/Parse.js +++ b/src/Parse.js @@ -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 + '', @@ -1152,4 +1152,4 @@ function h2czContext(zindex) { zindex: zindex, children: [] }; -} \ No newline at end of file +}