Skip to content

Commit

Permalink
Merge pull request #4925 from yurydelendik/protdisable
Browse files Browse the repository at this point in the history
Protects PDFJS.disableXXX == true from change
  • Loading branch information
yurydelendik committed Jun 12, 2014
2 parents b37b338 + 3b405cf commit a75b685
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions web/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,33 @@ var PDFView = {

var initializedPromise = Promise.all([
Preferences.get('enableWebGL').then(function resolved(value) {
if (PDFJS.disableWebGL === true) {
return;
}
PDFJS.disableWebGL = !value;
}),
Preferences.get('sidebarViewOnLoad').then(function resolved(value) {
self.preferenceSidebarViewOnLoad = value;
}),
Preferences.get('disableTextLayer').then(function resolved(value) {
if (PDFJS.disableTextLayer === true) {
return;
}
PDFJS.disableTextLayer = value;
}),
Preferences.get('disableRange').then(function resolved(value) {
if (PDFJS.disableRange === true) {
return;
}
PDFJS.disableRange = value;
}),
Preferences.get('disableAutoFetch').then(function resolved(value) {
PDFJS.disableAutoFetch = value;
}),
Preferences.get('disableFontFace').then(function resolved(value) {
if (PDFJS.disableFontFace === true) {
return;
}
PDFJS.disableFontFace = value;
}),
Preferences.get('useOnlyCssZoom').then(function resolved(value) {
Expand Down

0 comments on commit a75b685

Please sign in to comment.