[Pkg-javascript-commits] [pdf.js] 115/139: Remove unused annotation highlight div

David Prévot taffit at moszumanska.debian.org
Fri Jan 9 21:18:34 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 c67ad28673a3bfb6efe27174e556151f0e2d3efe
Author: Tim van der Meij <timvandermeij at gmail.com>
Date:   Sun Dec 21 17:34:27 2014 +0100

    Remove unused annotation highlight div
    
    This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.
---
 src/display/annotation_helper.js | 11 -----------
 web/pdf_viewer.css               |  5 -----
 2 files changed, 16 deletions(-)

diff --git a/src/display/annotation_helper.js b/src/display/annotation_helper.js
index d5ce2df..3236176 100644
--- a/src/display/annotation_helper.js
+++ b/src/display/annotation_helper.js
@@ -18,7 +18,6 @@
 
 'use strict';
 
-var HIGHLIGHT_OFFSET = 4; // px
 var ANNOT_MIN_SIZE = 10; // px
 
 var AnnotationUtils = (function AnnotationUtilsClosure() {
@@ -66,16 +65,6 @@ var AnnotationUtils = (function AnnotationUtilsClosure() {
     }
     cstyle.width = width + 'px';
     cstyle.height = height + 'px';
-
-    var highlight = document.createElement('div');
-    highlight.className = 'annotationHighlight';
-    highlight.style.left = highlight.style.top = -HIGHLIGHT_OFFSET + 'px';
-    highlight.style.right = highlight.style.bottom = -HIGHLIGHT_OFFSET + 'px';
-    highlight.setAttribute('hidden', true);
-
-    item.highlightElement = highlight;
-    container.appendChild(item.highlightElement);
-
     return container;
   }
 
diff --git a/web/pdf_viewer.css b/web/pdf_viewer.css
index 0c907fc..e97fbe0 100644
--- a/web/pdf_viewer.css
+++ b/web/pdf_viewer.css
@@ -72,11 +72,6 @@
   border: 0;
 }
 
-.pdfViewer .page .annotationHighlight {
-  position: absolute;
-  border: 2px #FFFF99 solid;
-}
-
 .pdfViewer .page .annotText > img {
   position: absolute;
   cursor: pointer;

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