Skip to content

Commit

Permalink
Merge pull request #6772 from Snuffleupagus/remove-s-in-AnnotationsLa…
Browse files Browse the repository at this point in the history
…yerBuilder

Remove a superfluous "s" in `AnnotationsLayerBuilder` from files in web/
  • Loading branch information
timvandermeij committed Dec 18, 2015
2 parents e45e7d0 + 3079dd9 commit 9228e1f
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion examples/components/pageviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use strict';

/**
* @typedef {Object} AnnotationsLayerBuilderOptions
* @typedef {Object} AnnotationLayerBuilderOptions
* @property {HTMLDivElement} pageDiv
* @property {PDFPage} pdfPage
* @property {IPDFLinkService} linkService
Expand All @@ -26,27 +26,27 @@
/**
* @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;

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),
Expand Down Expand Up @@ -79,30 +79,30 @@ var AnnotationsLayerBuilder = (function AnnotationsLayerBuilderClosure() {
});
},

hide: function AnnotationsLayerBuilder_hide() {
hide: function AnnotationLayerBuilder_hide() {
if (!this.div) {
return;
}
this.div.setAttribute('hidden', 'true');
}
};

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(),
Expand Down
8 changes: 4 additions & 4 deletions web/interfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
};
14 changes: 7 additions & 7 deletions web/pdf_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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
*/

/**
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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');
}
Expand Down
8 changes: 4 additions & 4 deletions web/pdf_viewer.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/pdf_viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/
@import url(text_layer_builder.css);
@import url(annotations_layer_builder.css);
@import url(annotation_layer_builder.css);

.pdfViewer .canvasWrapper {
overflow: hidden;
Expand Down
12 changes: 6 additions & 6 deletions web/pdf_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion web/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<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>
Expand Down

0 comments on commit 9228e1f

Please sign in to comment.