mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
This is very old code, and predates e.g. the introduction of JavaScript classes, which creates unnecessarily unwieldy code in the viewer. By introducing a new `TextLayer` class in the API, similar to how e.g. the `AnnotationLayer` looks, we're able to keep most parameters on the class-instance itself. This removes the need to manually track them in the viewer, and simplifies the call-sites. This also removes the `numTextDivs` parameter from the "textlayerrendered" event, since that's only added to support default-viewer functionality that no longer exists. Finally we try, as far as possible, to polyfill the old `renderTextLayer` and `updateTextLayer` functions since they are exposed in the library API. For *simple* invocations of `renderTextLayer` the behaviour should thus be the same, with only a warning printed in the console. |
||
---|---|---|
.. | ||
chromium | ||
font | ||
fuzz | ||
images | ||
integration | ||
pdfs | ||
resources | ||
stats | ||
types | ||
unit | ||
.eslintrc | ||
.gitignore | ||
add_test.mjs | ||
annotation_layer_builder_overrides.css | ||
downloadutils.mjs | ||
draw_layer_test.css | ||
driver.js | ||
integration-boot.mjs | ||
test.mjs | ||
test_manifest.json | ||
test_slave.html | ||
testutils.mjs | ||
text_layer_test.css | ||
webserver.mjs | ||
xfa_layer_builder_overrides.css |