mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 15:48:06 +02:00
Remove unused variables
These have been found using `gulp lint` in combination with the `unused: true` parameter for JSHint. Unfortunately there are too many false positives to enable this feature, but now that most globals have been removed because of the conversion to UMD the results are much more useful than before.
This commit is contained in:
parent
c1c199d702
commit
6a7012aaca
8 changed files with 4 additions and 10 deletions
|
@ -857,7 +857,6 @@ var PDFViewerApplication = {
|
|||
pdfViewer.setDocument(pdfDocument);
|
||||
var firstPagePromise = pdfViewer.firstPagePromise;
|
||||
var pagesPromise = pdfViewer.pagesPromise;
|
||||
var onePageRendered = pdfViewer.onePageRendered;
|
||||
|
||||
this.pageRotation = 0;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
} else {
|
||||
factory((root.pdfjsWebPDFFindController = {}), root.pdfjsWebUIUtils);
|
||||
}
|
||||
}(this, function (exports, uiUtils, firefoxCom) {
|
||||
}(this, function (exports, uiUtils) {
|
||||
|
||||
var scrollIntoView = uiUtils.scrollIntoView;
|
||||
|
||||
|
@ -322,10 +322,9 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|||
* @param {number} index - match index.
|
||||
* @param {Array} elements - text layer div elements array.
|
||||
* @param {number} beginIdx - start index of the div array for the match.
|
||||
* @param {number} endIdx - end index of the div array for the match.
|
||||
*/
|
||||
updateMatchPosition: function PDFFindController_updateMatchPosition(
|
||||
pageIndex, index, elements, beginIdx, endIdx) {
|
||||
pageIndex, index, elements, beginIdx) {
|
||||
if (this.selected.matchIdx === index &&
|
||||
this.selected.pageIdx === pageIndex) {
|
||||
var spot = {
|
||||
|
|
|
@ -187,7 +187,6 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|||
var isScalingRestricted = false;
|
||||
if (this.canvas && pdfjsLib.PDFJS.maxCanvasPixels > 0) {
|
||||
var outputScale = this.outputScale;
|
||||
var pixelsInViewport = this.viewport.width * this.viewport.height;
|
||||
if (((Math.floor(this.viewport.width) * outputScale.sx) | 0) *
|
||||
((Math.floor(this.viewport.height) * outputScale.sy) | 0) >
|
||||
pdfjsLib.PDFJS.maxCanvasPixels) {
|
||||
|
|
|
@ -225,7 +225,7 @@ var TextLayerBuilder = (function TextLayerBuilderClosure() {
|
|||
|
||||
if (this.findController) {
|
||||
this.findController.updateMatchPosition(pageIdx, i, textDivs,
|
||||
begin.divIdx, end.divIdx);
|
||||
begin.divIdx);
|
||||
}
|
||||
|
||||
// Match inside new div.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue