[Pkg-javascript-commits] [pdf.js] 23/414: Remove a superfluous "s" in `AnnotationsLayerBuilder` from files in web/

David Prévot taffit at moszumanska.debian.org
Tue Jun 28 17:12:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 3079dd937f9f68533d46fff420e80b6eaaead09c
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Thu Dec 17 12:54:53 2015 +0100

    Remove a superfluous "s" in `AnnotationsLayerBuilder` from files in web/
    
    This patch makes the naming consistent with the `TextLayerBuilder`, and also the new `AnnotationLayer`, and should thus help reduce possible confusion when working with the code.
    Please note that the files were renamed using `git mv`, in order to preserve blame.
---
 examples/components/pageviewer.js                  |  2 +-
 ...er_builder.css => annotation_layer_builder.css} |  0
 ...ayer_builder.js => annotation_layer_builder.js} | 32 +++++++++++-----------
 web/interfaces.js                                  |  8 +++---
 web/pdf_page_view.js                               | 14 +++++-----
 web/pdf_viewer.component.js                        |  8 +++---
 web/pdf_viewer.css                                 |  2 +-
 web/pdf_viewer.js                                  | 12 ++++----
 web/viewer.html                                    |  2 +-
 9 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/examples/components/pageviewer.js b/examples/components/pageviewer.js
index c36e375..98590e4 100644
--- a/examples/components/pageviewer.js
+++ b/examples/components/pageviewer.js
@@ -47,7 +47,7 @@ PDFJS.getDocument(DEFAULT_URL).then(function (pdfDocument) {
       defaultViewport: pdfPage.getViewport(SCALE),
       // We can enable text/annotations layers, if needed
       textLayerFactory: new PDFJS.DefaultTextLayerFactory(),
-      annotationsLayerFactory: new PDFJS.DefaultAnnotationsLayerFactory()
+      annotationLayerFactory: new PDFJS.DefaultAnnotationLayerFactory()
     });
     // Associates the actual page with the view, and drawing it
     pdfPageView.setPdfPage(pdfPage);
diff --git a/web/annotations_layer_builder.css b/web/annotation_layer_builder.css
similarity index 100%
rename from web/annotations_layer_builder.css
rename to web/annotation_layer_builder.css
diff --git a/web/annotations_layer_builder.js b/web/annotation_layer_builder.js
similarity index 75%
rename from web/annotations_layer_builder.js
rename to web/annotation_layer_builder.js
index e9b0fbd..0462aa3 100644
--- a/web/annotations_layer_builder.js
+++ b/web/annotation_layer_builder.js
@@ -17,7 +17,7 @@
 'use strict';
 
 /**
- * @typedef {Object} AnnotationsLayerBuilderOptions
+ * @typedef {Object} AnnotationLayerBuilderOptions
  * @property {HTMLDivElement} pageDiv
  * @property {PDFPage} pdfPage
  * @property {IPDFLinkService} linkService
@@ -26,12 +26,12 @@
 /**
  * @class
  */
-var AnnotationsLayerBuilder = (function AnnotationsLayerBuilderClosure() {
+var AnnotationLayerBuilder = (function AnnotationLayerBuilderClosure() {
   /**
-   * @param {AnnotationsLayerBuilderOptions} options
-   * @constructs AnnotationsLayerBuilder
+   * @param {AnnotationLayerBuilderOptions} options
+   * @constructs AnnotationLayerBuilder
    */
-  function AnnotationsLayerBuilder(options) {
+  function AnnotationLayerBuilder(options) {
     this.pageDiv = options.pageDiv;
     this.pdfPage = options.pdfPage;
     this.linkService = options.linkService;
@@ -39,14 +39,14 @@ var AnnotationsLayerBuilder = (function AnnotationsLayerBuilderClosure() {
     this.div = null;
   }
 
-  AnnotationsLayerBuilder.prototype =
-      /** @lends AnnotationsLayerBuilder.prototype */ {
+  AnnotationLayerBuilder.prototype =
+      /** @lends AnnotationLayerBuilder.prototype */ {
 
     /**
      * @param {PageViewport} viewport
      * @param {string} intent (default value is 'display')
      */
-    render: function AnnotationsLayerBuilder_render(viewport, intent) {
+    render: function AnnotationLayerBuilder_render(viewport, intent) {
       var self = this;
       var parameters = {
         intent: (intent === undefined ? 'display' : intent),
@@ -79,7 +79,7 @@ var AnnotationsLayerBuilder = (function AnnotationsLayerBuilderClosure() {
       });
     },
 
-    hide: function AnnotationsLayerBuilder_hide() {
+    hide: function AnnotationLayerBuilder_hide() {
       if (!this.div) {
         return;
       }
@@ -87,22 +87,22 @@ var AnnotationsLayerBuilder = (function AnnotationsLayerBuilderClosure() {
     }
   };
 
-  return AnnotationsLayerBuilder;
+  return AnnotationLayerBuilder;
 })();
 
 /**
  * @constructor
- * @implements IPDFAnnotationsLayerFactory
+ * @implements IPDFAnnotationLayerFactory
  */
-function DefaultAnnotationsLayerFactory() {}
-DefaultAnnotationsLayerFactory.prototype = {
+function DefaultAnnotationLayerFactory() {}
+DefaultAnnotationLayerFactory.prototype = {
   /**
    * @param {HTMLDivElement} pageDiv
    * @param {PDFPage} pdfPage
-   * @returns {AnnotationsLayerBuilder}
+   * @returns {AnnotationLayerBuilder}
    */
-  createAnnotationsLayerBuilder: function (pageDiv, pdfPage) {
-    return new AnnotationsLayerBuilder({
+  createAnnotationLayerBuilder: function (pageDiv, pdfPage) {
+    return new AnnotationLayerBuilder({
       pageDiv: pageDiv,
       pdfPage: pdfPage,
       linkService: new SimpleLinkService(),
diff --git a/web/interfaces.js b/web/interfaces.js
index 1eec7de..94d958c 100644
--- a/web/interfaces.js
+++ b/web/interfaces.js
@@ -106,12 +106,12 @@ IPDFTextLayerFactory.prototype = {
 /**
  * @interface
  */
-function IPDFAnnotationsLayerFactory() {}
-IPDFAnnotationsLayerFactory.prototype = {
+function IPDFAnnotationLayerFactory() {}
+IPDFAnnotationLayerFactory.prototype = {
   /**
    * @param {HTMLDivElement} pageDiv
    * @param {PDFPage} pdfPage
-   * @returns {AnnotationsLayerBuilder}
+   * @returns {AnnotationLayerBuilder}
    */
-  createAnnotationsLayerBuilder: function (pageDiv, pdfPage) {}
+  createAnnotationLayerBuilder: function (pageDiv, pdfPage) {}
 };
diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js
index 1e1e685..46afd5c 100644
--- a/web/pdf_page_view.js
+++ b/web/pdf_page_view.js
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 /* globals RenderingStates, PDFJS, DEFAULT_SCALE, CSS_UNITS, getOutputScale,
-           TextLayerBuilder, AnnotationsLayerBuilder, Promise,
+           TextLayerBuilder, AnnotationLayerBuilder, Promise,
            approximateFraction, roundToDivide */
 
 'use strict';
@@ -28,7 +28,7 @@ var TEXT_LAYER_RENDER_DELAY = 200; // ms
  * @property {PageViewport} defaultViewport - The page viewport.
  * @property {PDFRenderingQueue} renderingQueue - The rendering queue object.
  * @property {IPDFTextLayerFactory} textLayerFactory
- * @property {IPDFAnnotationsLayerFactory} annotationsLayerFactory
+ * @property {IPDFAnnotationLayerFactory} annotationLayerFactory
  */
 
 /**
@@ -49,7 +49,7 @@ var PDFPageView = (function PDFPageViewClosure() {
     var defaultViewport = options.defaultViewport;
     var renderingQueue = options.renderingQueue;
     var textLayerFactory = options.textLayerFactory;
-    var annotationsLayerFactory = options.annotationsLayerFactory;
+    var annotationLayerFactory = options.annotationLayerFactory;
 
     this.id = id;
     this.renderingId = 'page' + id;
@@ -62,7 +62,7 @@ var PDFPageView = (function PDFPageViewClosure() {
 
     this.renderingQueue = renderingQueue;
     this.textLayerFactory = textLayerFactory;
-    this.annotationsLayerFactory = annotationsLayerFactory;
+    this.annotationLayerFactory = annotationLayerFactory;
 
     this.renderingState = RenderingStates.INITIAL;
     this.resume = null;
@@ -502,10 +502,10 @@ var PDFPageView = (function PDFPageViewClosure() {
         }
       );
 
-      if (this.annotationsLayerFactory) {
+      if (this.annotationLayerFactory) {
         if (!this.annotationLayer) {
-          this.annotationLayer = this.annotationsLayerFactory.
-            createAnnotationsLayerBuilder(div, this.pdfPage);
+          this.annotationLayer = this.annotationLayerFactory.
+            createAnnotationLayerBuilder(div, this.pdfPage);
         }
         this.annotationLayer.render(this.viewport, 'display');
       }
diff --git a/web/pdf_viewer.component.js b/web/pdf_viewer.component.js
index 55c0f88..99b450e 100644
--- a/web/pdf_viewer.component.js
+++ b/web/pdf_viewer.component.js
@@ -14,8 +14,8 @@
  */
 /*jshint globalstrict: false */
 /* globals PDFJS, PDFViewer, PDFPageView, TextLayerBuilder, PDFLinkService,
-           DefaultTextLayerFactory, AnnotationsLayerBuilder, PDFHistory,
-           DefaultAnnotationsLayerFactory, getFileName, ProgressBar */
+           DefaultTextLayerFactory, AnnotationLayerBuilder, PDFHistory,
+           DefaultAnnotationLayerFactory, getFileName, ProgressBar */
 
 // Initializing PDFJS global object (if still undefined)
 if (typeof PDFJS === 'undefined') {
@@ -35,8 +35,8 @@ if (typeof PDFJS === 'undefined') {
   PDFJS.PDFLinkService = PDFLinkService;
   PDFJS.TextLayerBuilder = TextLayerBuilder;
   PDFJS.DefaultTextLayerFactory = DefaultTextLayerFactory;
-  PDFJS.AnnotationsLayerBuilder = AnnotationsLayerBuilder;
-  PDFJS.DefaultAnnotationsLayerFactory = DefaultAnnotationsLayerFactory;
+  PDFJS.AnnotationLayerBuilder = AnnotationLayerBuilder;
+  PDFJS.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory;
   PDFJS.PDFHistory = PDFHistory;
 
   PDFJS.getFileName = getFileName;
diff --git a/web/pdf_viewer.css b/web/pdf_viewer.css
index 130047e..e399a42 100644
--- a/web/pdf_viewer.css
+++ b/web/pdf_viewer.css
@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 @import url(text_layer_builder.css);
- at import url(annotations_layer_builder.css);
+ at import url(annotation_layer_builder.css);
 
 .pdfViewer .canvasWrapper {
   overflow: hidden;
diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js
index a9c3d3d..2584a02 100644
--- a/web/pdf_viewer.js
+++ b/web/pdf_viewer.js
@@ -16,7 +16,7 @@
            SCROLLBAR_PADDING, VERTICAL_PADDING, MAX_AUTO_SCALE, CSS_UNITS,
            DEFAULT_SCALE, scrollIntoView, getVisibleElements, RenderingStates,
            PDFJS, Promise, TextLayerBuilder, PDFRenderingQueue,
-           AnnotationsLayerBuilder, DEFAULT_SCALE_VALUE */
+           AnnotationLayerBuilder, DEFAULT_SCALE_VALUE */
 
 'use strict';
 
@@ -33,7 +33,7 @@ var DEFAULT_CACHE_SIZE = 10;
 //#include pdf_rendering_queue.js
 //#include pdf_page_view.js
 //#include text_layer_builder.js
-//#include annotations_layer_builder.js
+//#include annotation_layer_builder.js
 
 /**
  * @typedef {Object} PDFViewerOptions
@@ -294,7 +294,7 @@ var PDFViewer = (function pdfViewer() {
             defaultViewport: viewport.clone(),
             renderingQueue: this.renderingQueue,
             textLayerFactory: textLayerFactory,
-            annotationsLayerFactory: this
+            annotationLayerFactory: this
           });
           bindOnAfterAndBeforeDraw(pageView);
           this._pages.push(pageView);
@@ -751,10 +751,10 @@ var PDFViewer = (function pdfViewer() {
     /**
      * @param {HTMLDivElement} pageDiv
      * @param {PDFPage} pdfPage
-     * @returns {AnnotationsLayerBuilder}
+     * @returns {AnnotationLayerBuilder}
      */
-    createAnnotationsLayerBuilder: function (pageDiv, pdfPage) {
-      return new AnnotationsLayerBuilder({
+    createAnnotationLayerBuilder: function (pageDiv, pdfPage) {
+      return new AnnotationLayerBuilder({
         pageDiv: pageDiv,
         pdfPage: pdfPage,
         linkService: this.linkService
diff --git a/web/viewer.html b/web/viewer.html
index 2423e9b..2e64efa 100644
--- a/web/viewer.html
+++ b/web/viewer.html
@@ -81,7 +81,7 @@ See https://github.com/adobe-type-tools/cmap-resources
     <script src="pdf_rendering_queue.js"></script>
     <script src="pdf_page_view.js"></script>
     <script src="text_layer_builder.js"></script>
-    <script src="annotations_layer_builder.js"></script>
+    <script src="annotation_layer_builder.js"></script>
     <script src="pdf_viewer.js"></script>
     <script src="pdf_thumbnail_view.js"></script>
     <script src="pdf_thumbnail_viewer.js"></script>

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