mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Move the pdfBug
option from the global PDFJS
object and into getDocument
instead
Also removes the now unused `getDefaultSetting` helper function.
This commit is contained in:
parent
1d03ad0060
commit
212553840f
7 changed files with 33 additions and 44 deletions
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
|
||||
import { AbortException, createPromiseCapability, Util } from '../shared/util';
|
||||
import { getDefaultSetting } from './dom_utils';
|
||||
import globalScope from '../shared/global_scope';
|
||||
|
||||
/**
|
||||
* Text layer render parameters.
|
||||
|
@ -107,11 +107,9 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||
textDiv.setAttribute('style', textDivProperties.style);
|
||||
|
||||
textDiv.textContent = geom.str;
|
||||
// |fontName| is only used by the Font Inspector. This test will succeed
|
||||
// when e.g. the Font Inspector is off but the Stepper is on, but it's
|
||||
// not worth the effort to do a more accurate test. We only use `dataset`
|
||||
// here to make the font name available for the debugger.
|
||||
if (getDefaultSetting('pdfBug')) {
|
||||
// `fontName` is only used by the FontInspector, and we only use `dataset`
|
||||
// here to make the font name available in the debugger.
|
||||
if (task._fontInspectorEnabled) {
|
||||
textDiv.dataset.fontName = geom.fontName;
|
||||
}
|
||||
if (angle !== 0) {
|
||||
|
@ -479,6 +477,8 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||
this._textDivs = textDivs || [];
|
||||
this._textContentItemsStr = textContentItemsStr || [];
|
||||
this._enhanceTextSelection = !!enhanceTextSelection;
|
||||
this._fontInspectorEnabled = !!(globalScope.FontInspector &&
|
||||
globalScope.FontInspector.enabled);
|
||||
|
||||
this._reader = null;
|
||||
this._layoutTextLastFontSize = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue