Re-factor the CSS_PIXELS_PER_INCH/PDF_PIXELS_PER_INCH exports (PR 13991 follow-up)

For improved maintainability, since these constants are being exposed in the official API, this patch moves them into an Object instead.
This commit is contained in:
Jonas Jenwald 2021-09-11 11:11:32 +02:00
parent bd51bbfd16
commit 0e54f568fb
7 changed files with 18 additions and 20 deletions

View file

@ -13,9 +13,9 @@
* limitations under the License.
*/
import { CSS_PIXELS_PER_INCH, PDF_PIXELS_PER_INCH } from "pdfjs-lib";
import { PixelsPerInch } from "pdfjs-lib";
const CSS_UNITS = CSS_PIXELS_PER_INCH / PDF_PIXELS_PER_INCH;
const CSS_UNITS = PixelsPerInch.CSS / PixelsPerInch.PDF;
const DEFAULT_SCALE_VALUE = "auto";
const DEFAULT_SCALE = 1.0;
const MIN_SCALE = 0.1;