Revert "Add a enhanceTextSelection preference to the viewer"

This reverts commit 15e45d772f181e735713dcf077d03e2fc87e3a45.
This commit is contained in:
Tim van der Meij 2016-09-03 20:26:46 +02:00
parent 461a18a74a
commit a2525a8ba3
4 changed files with 6 additions and 14 deletions

View File

@ -94,10 +94,6 @@
"type": "boolean",
"description": "Whether to prevent the extension from reporting the extension and browser version to the extension developers.",
"default": false
},
"enhanceTextSelection": {
"type": "boolean",
"default": false
}
}
}

View File

@ -101,6 +101,7 @@ var SCALE_SELECT_CONTAINER_PADDING = 8;
var SCALE_SELECT_PADDING = 22;
var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading';
var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000;
var ENHANCE_TEXT_SELECTION = false;
function configure(PDFJS) {
PDFJS.imageResourcesPath = './images/';
@ -176,7 +177,6 @@ var PDFViewerApplication = {
preferencePdfBugEnabled: false,
preferenceShowPreviousViewOnLoad: true,
preferenceDefaultZoomValue: '',
preferenceEnhanceTextSelection: false,
isViewerEmbedded: (window.parent !== window),
url: '',
externalServices: DefaultExernalServices,
@ -206,9 +206,6 @@ var PDFViewerApplication = {
Preferences.get('defaultZoomValue').then(function resolved(value) {
self.preferenceDefaultZoomValue = value;
}),
Preferences.get('enhanceTextSelection').then(function resolved(value) {
self.preferenceEnhanceTextSelection = value;
}),
Preferences.get('disableTextLayer').then(function resolved(value) {
if (PDFJS.disableTextLayer === true) {
return;
@ -277,7 +274,7 @@ var PDFViewerApplication = {
renderingQueue: pdfRenderingQueue,
linkService: pdfLinkService,
downloadManager: downloadManager,
enhanceTextSelection: this.preferenceEnhanceTextSelection,
enhanceTextSelection: ENHANCE_TEXT_SELECTION,
});
pdfRenderingQueue.setViewer(this.pdfViewer);
pdfLinkService.setViewer(this.pdfViewer);

View File

@ -11,6 +11,5 @@
"disableFontFace": false,
"disableTextLayer": false,
"useOnlyCssZoom": false,
"externalLinkTarget": 0,
"enhanceTextSelection": false
}
"externalLinkTarget": 0
}

View File

@ -36,7 +36,7 @@
* @property {PageViewport} viewport - The viewport of the text layer.
* @property {PDFFindController} findController
* @property {boolean} enhanceTextSelection - Option to turn on improved
* text selection. The default value is `false`.
* text selection.
*/
/**
@ -59,7 +59,7 @@ var TextLayerBuilder = (function TextLayerBuilderClosure() {
this.textDivs = [];
this.findController = options.findController || null;
this.textLayerRenderTask = null;
this.enhanceTextSelection = options.enhanceTextSelection || false;
this.enhanceTextSelection = options.enhanceTextSelection;
this._bindMouse();
}