[Pkg-javascript-commits] [pdf.js] 12/72: Remove the |el| property in PDFPageView and PDFThumbnailView

David Prévot taffit at moszumanska.debian.org
Wed Mar 18 20:15:55 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 eed67ea8bbba61a05877a99dc2f03b5adad5a288
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Sun Feb 8 17:40:52 2015 +0100

    Remove the |el| property in PDFPageView and PDFThumbnailView
---
 web/pdf_page_view.js      | 1 -
 web/pdf_thumbnail_view.js | 1 -
 web/ui_utils.js           | 8 ++++----
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js
index 468d30d..8e49cba 100644
--- a/web/pdf_page_view.js
+++ b/web/pdf_page_view.js
@@ -80,7 +80,6 @@ var PDFPageView = (function PDFPageViewClosure() {
     div.className = 'page';
     div.style.width = Math.floor(this.viewport.width) + 'px';
     div.style.height = Math.floor(this.viewport.height) + 'px';
-    this.el = div; // TODO replace 'el' property usage
     this.div = div;
 
     container.appendChild(div);
diff --git a/web/pdf_thumbnail_view.js b/web/pdf_thumbnail_view.js
index dc5da0f..d83d30d 100644
--- a/web/pdf_thumbnail_view.js
+++ b/web/pdf_thumbnail_view.js
@@ -99,7 +99,6 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() {
     var div = document.createElement('div');
     div.id = 'thumbnailContainer' + id;
     div.className = 'thumbnail';
-    this.el = div; // TODO: replace 'el' property usage.
     this.div = div;
 
     if (id === 1) {
diff --git a/web/ui_utils.js b/web/ui_utils.js
index 3c32c59..00eb25e 100644
--- a/web/ui_utils.js
+++ b/web/ui_utils.js
@@ -194,16 +194,16 @@ function getVisibleElements(scrollEl, views, sortByVisibility) {
   var currentWidth, viewWidth;
   for (var i = 0, ii = views.length; i < ii; ++i) {
     view = views[i];
-    currentHeight = view.el.offsetTop + view.el.clientTop;
-    viewHeight = view.el.clientHeight;
+    currentHeight = view.div.offsetTop + view.div.clientTop;
+    viewHeight = view.div.clientHeight;
     if ((currentHeight + viewHeight) < top) {
       continue;
     }
     if (currentHeight > bottom) {
       break;
     }
-    currentWidth = view.el.offsetLeft + view.el.clientLeft;
-    viewWidth = view.el.clientWidth;
+    currentWidth = view.div.offsetLeft + view.div.clientLeft;
+    viewWidth = view.div.clientWidth;
     if ((currentWidth + viewWidth) < left || currentWidth > right) {
       continue;
     }

-- 
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