Added support for "data-html2canvas-ignore" attribute

This commit is contained in:
Niklas von Hertzen 2012-11-25 22:25:08 +02:00
parent 084bf4b039
commit 7c0b893564
3 changed files with 14 additions and 12 deletions

2
.gitignore vendored
View File

@ -9,5 +9,7 @@
image.jpg
/.project
/.settings/
node_modules/
.envrc
tests/selenium.js
*.sublime-workspace

View File

@ -1271,7 +1271,7 @@ _html2canvas.Parse = function ( images, options ) {
function parseElement (el, stack) {
// skip hidden elements and their children
if (getCSS(el, 'display') !== "none" && getCSS(el, 'visibility') !== "hidden") {
if (getCSS(el, 'display') !== "none" && getCSS(el, 'visibility') !== "hidden" && !el.hasAttribute("data-html2canvas-ignore")) {
stack = renderElement(el, stack) || stack;