From 1792269c0178e9df3259417b5d2ce0b9709cd7d7 Mon Sep 17 00:00:00 2001 From: MoyuScript Date: Wed, 23 Nov 2011 14:07:12 +0100 Subject: [PATCH] instead of scrolling the view on every Bounds() call, do it only once --- src/Core.js | 2 -- src/Parse.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Core.js b/src/Core.js index 0600ac3..0cef04e 100644 --- a/src/Core.js +++ b/src/Core.js @@ -36,8 +36,6 @@ html2canvas.Util.backgroundImage = function (src) { }; html2canvas.Util.Bounds = function getBounds (el) { - - window.scroll(0,0); var clientRect, bounds = {}; diff --git a/src/Parse.js b/src/Parse.js index 799e9f2..8dc2f41 100644 --- a/src/Parse.js +++ b/src/Parse.js @@ -11,7 +11,7 @@ */ html2canvas.Parse = function (element, images, opts) { - + window.scroll(0,0); opts = opts || {}; // select body by default