Commit 802828af authored by Robert Knight's avatar Robert Knight

Improve a couple of code comments

Improve a few code comments and follow the convention of using
destructing for constructors that take a single `options` argument.
parent 0f3a1295
...@@ -180,7 +180,7 @@ function getPageTextContent(pageIndex) { ...@@ -180,7 +180,7 @@ function getPageTextContent(pageIndex) {
}); });
let items = textContent.items; let items = textContent.items;
// Older versions of PDF.js did not create elements in the text layer for // Versions of PDF.js < v2.9.359 did not create elements in the text layer for
// text items that contained all-whitespace strings. Newer versions (after // text items that contained all-whitespace strings. Newer versions (after
// https://github.com/mozilla/pdf.js/pull/13257) do. The same commit also // https://github.com/mozilla/pdf.js/pull/13257) do. The same commit also
// introduced the `hasEOL` property to text items, so we use the absence // introduced the `hasEOL` property to text items, so we use the absence
......
...@@ -81,6 +81,7 @@ class FakePDFPageProxy { ...@@ -81,6 +81,7 @@ class FakePDFPageProxy {
); );
} }
/** @param {string} str */
const makeTextItem = str => { const makeTextItem = str => {
if (this._config.newTextRendering) { if (this._config.newTextRendering) {
// The `hasEOL` property was added in https://github.com/mozilla/pdf.js/pull/13257 // The `hasEOL` property was added in https://github.com/mozilla/pdf.js/pull/13257
...@@ -151,10 +152,10 @@ class FakePDFViewer { ...@@ -151,10 +152,10 @@ class FakePDFViewer {
/** /**
* @param {Options} options * @param {Options} options
*/ */
constructor(options) { constructor({ config, container, content }) {
this._config = options.config; this._config = config;
this._container = options.container; this._container = container;
this._content = options.content; this._content = content;
/** @type {FakePDFPageView} */ /** @type {FakePDFPageView} */
this._pages = []; this._pages = [];
......
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