[Pkg-javascript-commits] [pdf.js] 141/204: Followup fix for entering/exiting Presentation mode
David Prévot
taffit at moszumanska.debian.org
Sat Oct 25 18:50:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit b06e65e5d6a007d39b352fd19ae17cf6647b779d
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Tue Sep 30 12:42:26 2014 +0200
Followup fix for entering/exiting Presentation mode
Even after PR 5359, switching to/from Presentation mode is still sluggish and I'm still seeing `too much recursion` printed in the console.
I've managed to track down the issue to line https://github.com/mozilla/pdf.js/blob/master/web/page_view.js#L371. It appears that for this particular case, we actually *need* to set `noScroll = true` when calling the `_setScale` function. (Note that it only applies to *this* line, and not to Presentation mode in general.)
Given the amount of refactoring done to the viewer, I'm not sure what the best way to fix this would be. However I'm submitting this patch as an easy workaround for now, but we should probably refactor this to avoid calling a "private" method directly.
---
web/page_view.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/page_view.js b/web/page_view.js
index 46b53a6..3db952f 100644
--- a/web/page_view.js
+++ b/web/page_view.js
@@ -368,7 +368,7 @@ var PageView = function pageView(container, id, scale, defaultViewport,
}
dest = null;
// Fixes the case when PDF has different page sizes.
- this.viewer.currentScaleValue = this.viewer.currentScaleValue;
+ this.viewer._setScale(this.viewer.currentScaleValue, true);
}
if (!dest) {
scrollIntoView(div);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list