Commit ceb9d4b2 authored by csillag's avatar csillag

Update PDF plugin

... to cfac672e (typed-packaging branch).

Fixes #1788.
parent 17bc4593
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-6623b2c
** Annotator 1.2.6-dev-bee2b25
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-12-11 01:33:35Z
** Built at: 2014-12-11 02:43:05Z
*/
......@@ -124,9 +124,7 @@
}
}
});
return $(this._viewer.container).on('scroll', function() {
return _this._onScroll();
});
return this._viewer.container.addEventListener("scroll", this._onScroll);
};
PDFTextMapper.prototype._extractionPattern = /[ ]+/g;
......@@ -217,7 +215,7 @@
};
PDFTextMapper.prototype.getDocumentInfo = function() {
return this.app.documentInfo;
return this._app.documentInfo;
};
return PDFTextMapper;
......@@ -314,7 +312,13 @@
return new Promise(function(resolve, reject) {
if (_this.annotator.domMapper.waitForInit != null) {
return _this.annotator.domMapper.waitForInit().then(function() {
return resolve(_this._metadata());
var error;
try {
return resolve(_this._metadata());
} catch (_error) {
error = _error;
return reject("Internal error");
}
});
} else {
return reject("Not a PDF dom mapper.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment