mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Merge pull request #14959 from Snuffleupagus/pageColors-thumbnails
Support custom `pageColors` in the thumbnails (PR 14874)
This commit is contained in:
commit
d80035b716
4 changed files with 52 additions and 12 deletions
|
@ -270,13 +270,15 @@ class BaseViewer {
|
|||
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
if (
|
||||
options.pageColors &&
|
||||
(!CSS.supports("color", options.pageColors.background) ||
|
||||
!CSS.supports("color", options.pageColors.foreground))
|
||||
this.pageColors &&
|
||||
!(
|
||||
CSS.supports("color", this.pageColors.background) &&
|
||||
CSS.supports("color", this.pageColors.foreground)
|
||||
)
|
||||
) {
|
||||
if (options.pageColors.background || options.pageColors.foreground) {
|
||||
if (this.pageColors.background || this.pageColors.foreground) {
|
||||
console.warn(
|
||||
"Ignoring `pageColors`-option, since the browser doesn't support the values used."
|
||||
"BaseViewer: Ignoring `pageColors`-option, since the browser doesn't support the values used."
|
||||
);
|
||||
}
|
||||
this.pageColors = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue