mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Replace pdfjsLib with module that represents pdf.js.
This commit is contained in:
parent
006e8fb59d
commit
4165cedc9f
16 changed files with 133 additions and 93 deletions
|
@ -12,7 +12,6 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals pdfjsLib */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -65,7 +64,7 @@ var FontInspector = (function FontInspectorClosure() {
|
|||
name: 'Font Inspector',
|
||||
panel: null,
|
||||
manager: null,
|
||||
init: function init() {
|
||||
init: function init(pdfjsLib) {
|
||||
var panel = this.panel;
|
||||
panel.setAttribute('style', 'padding: 5px;');
|
||||
var tmp = document.createElement('button');
|
||||
|
@ -291,7 +290,7 @@ var Stepper = (function StepperClosure() {
|
|||
this.operatorListIdx = 0;
|
||||
}
|
||||
Stepper.prototype = {
|
||||
init: function init() {
|
||||
init: function init(pdfjsLib) {
|
||||
var panel = this.panel;
|
||||
var content = c('div', 'c=continue, s=step');
|
||||
var table = c('table');
|
||||
|
@ -458,7 +457,7 @@ var Stats = (function Stats() {
|
|||
name: 'Stats',
|
||||
panel: null,
|
||||
manager: null,
|
||||
init: function init() {
|
||||
init: function init(pdfjsLib) {
|
||||
this.panel.setAttribute('style', 'padding: 5px;');
|
||||
pdfjsLib.PDFJS.enableStats = true;
|
||||
},
|
||||
|
@ -532,7 +531,7 @@ var PDFBug = (function PDFBugClosure() {
|
|||
});
|
||||
}
|
||||
},
|
||||
init: function init() {
|
||||
init: function init(pdfjsLib) {
|
||||
/*
|
||||
* Basic Layout:
|
||||
* PDFBug
|
||||
|
@ -576,7 +575,7 @@ var PDFBug = (function PDFBugClosure() {
|
|||
tool.panel = panel;
|
||||
tool.manager = this;
|
||||
if (tool.enabled) {
|
||||
tool.init();
|
||||
tool.init(pdfjsLib);
|
||||
} else {
|
||||
panel.textContent = tool.name + ' is disabled. To enable add ' +
|
||||
' "' + tool.id + '" to the pdfBug parameter ' +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue