mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
[api-minor] Combine the textContent
/textContentStream
parameters
Rather than handling these parameters separately, which is a left-over from back when streaming of textContent was originally added, we can simply pass either data directly to the `TextLayer` and let it handle things accordingly. Also, improves a few JSDoc comments and `typedef`-imports.
This commit is contained in:
parent
67e1c37e0f
commit
fe8fded23b
5 changed files with 58 additions and 62 deletions
|
@ -263,7 +263,7 @@ class Rasterize {
|
|||
|
||||
// Rendering text layer as HTML.
|
||||
const task = renderTextLayer({
|
||||
textContent,
|
||||
textContentSource: textContent,
|
||||
container: div,
|
||||
viewport,
|
||||
});
|
||||
|
|
|
@ -33,7 +33,7 @@ describe("textLayer", function () {
|
|||
const textContentItemsStr = [];
|
||||
|
||||
const textLayerRenderTask = renderTextLayer({
|
||||
textContentStream: page.streamTextContent(),
|
||||
textContentSource: page.streamTextContent(),
|
||||
container: document.createElement("div"),
|
||||
viewport: page.getViewport(),
|
||||
textContentItemsStr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue