1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

refactor src/core/pdf_manager.js: rename pdfModel to pdfDocument

Rename pdfModel to pdfDocument to let the name closer resemble what the
variable actually holds
This commit is contained in:
Thorben Bochenek 2014-03-12 09:51:40 +01:00
parent 57e896d29e
commit baccf3d160
2 changed files with 15 additions and 15 deletions

View file

@ -33,24 +33,24 @@ var BasePdfManager = (function BasePdfManagerClosure() {
throw new NotImplementedException();
},
ensureModel: function BasePdfManager_ensureModel(prop, args) {
return this.ensure(this.pdfModel, prop, args);
ensureDoc: function BasePdfManager_ensureDoc(prop, args) {
return this.ensure(this.pdfDocument, prop, args);
},
ensureXRef: function BasePdfManager_ensureXRef(prop, args) {
return this.ensure(this.pdfModel.xref, prop, args);
return this.ensure(this.pdfDocument.xref, prop, args);
},
ensureCatalog: function BasePdfManager_ensureCatalog(prop, args) {
return this.ensure(this.pdfModel.catalog, prop, args);
return this.ensure(this.pdfDocument.catalog, prop, args);
},
getPage: function BasePdfManager_pagePage(pageIndex) {
return this.pdfModel.getPage(pageIndex);
return this.pdfDocument.getPage(pageIndex);
},
cleanup: function BasePdfManager_cleanup() {
return this.pdfModel.cleanup();
return this.pdfDocument.cleanup();
},
ensure: function BasePdfManager_ensure(obj, prop, args) {
@ -66,7 +66,7 @@ var BasePdfManager = (function BasePdfManagerClosure() {
},
updatePassword: function BasePdfManager_updatePassword(password) {
this.pdfModel.xref.password = this.password = password;
this.pdfDocument.xref.password = this.password = password;
if (this.passwordChangedPromise) {
this.passwordChangedPromise.resolve();
}
@ -83,7 +83,7 @@ var BasePdfManager = (function BasePdfManagerClosure() {
var LocalPdfManager = (function LocalPdfManagerClosure() {
function LocalPdfManager(data, password) {
var stream = new Stream(data);
this.pdfModel = new PDFDocument(this, stream, password);
this.pdfDocument = new PDFDocument(this, stream, password);
this.loadedStream = new LegacyPromise();
this.loadedStream.resolve(stream);
}
@ -150,7 +150,7 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
this.streamManager = new ChunkedStreamManager(args.length, RANGE_CHUNK_SIZE,
args.url, params);
this.pdfModel = new PDFDocument(this, this.streamManager.getStream(),
this.pdfDocument = new PDFDocument(this, this.streamManager.getStream(),
args.password);
}