[Pkg-javascript-commits] [pdf.js] 17/116: Remove unused anchor links placed before every page
David Prévot
taffit at moszumanska.debian.org
Fri Mar 6 16:19:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 42a00394b05596eb1ff4e302e97303cce79dcc2b
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Sat Dec 27 13:06:23 2014 +0100
Remove unused anchor links placed before every page
In old versions of the viewer, anchor links were used to be able to scroll a page into view. Since we for quite some time have had a `scrollIntoView` function which handles this, the anchor links are no longer necessary and I believe that they can be removed. Doing so will reduce the total number of DOM elements in the viewer.
For most documents this patch will probably not make much of a difference performance wise, but for very long (1000+ pages) documents this could help performance especially on lower powered hardware.
---
web/pdf_page_view.js | 4 ----
1 file changed, 4 deletions(-)
diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js
index cb0725a..7080f88 100644
--- a/web/pdf_page_view.js
+++ b/web/pdf_page_view.js
@@ -75,9 +75,6 @@ var PDFPageView = (function PDFPageViewClosure() {
this.annotationLayer = null;
- var anchor = document.createElement('a');
- anchor.name = '' + this.id;
-
var div = document.createElement('div');
div.id = 'pageContainer' + this.id;
div.className = 'page';
@@ -86,7 +83,6 @@ var PDFPageView = (function PDFPageViewClosure() {
this.el = div; // TODO replace 'el' property usage
this.div = div;
- container.appendChild(anchor);
container.appendChild(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