Skip to content

Commit

Permalink
feat: PDFViewer 修改 outputScale 屬性默認值
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoKam committed Aug 18, 2023
1 parent 4c98085 commit 40a5678
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions packages/pdf-viewer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @orca-fe/pdf-viewer

## 1.17.1

### Patch Changes

- feat: PDFViewer 修改 outputScale 屬性默認值

## 1.17.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/pdf-viewer/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ title: PDF 阅读器 PdfViewer
| dropFile | 是否支持拖拽打开文件 | `boolean` | `false` | `1.9.0` |
| onPageChange | 翻页事件 | `(page: number) => void` | `-` | `1.11.2` |
| pdfJsParams | 额外的 pdfjs 参数,具体参数可(查看这里)[https://mozilla.github.io/pdf.js/api/draft/module-pdfjsLib.html] | `object` | `-` | `1.11.0` |
| outputScale | 渲染頁面的缩放级别 | `number` | `Math.max(window.devicePixelRatio, 2)` | `1.17.0` |
| outputScale | 渲染頁面的缩放级别 | `number` | `Math.max(window.devicePixelRatio, 1)` | `1.17.0` |

### PDFViewerHandle

Expand Down
2 changes: 1 addition & 1 deletion packages/pdf-viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orca-fe/pdf-viewer",
"version": "1.17.0",
"version": "1.17.1",
"description": "PDF Viewer",
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion packages/pdf-viewer/src/PDFPage/PDFPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { PageViewport } from '../context';
import PDFViewerContext from '../context';
import useStyle from './PDFPage.style';

const globalOutputScale = Math.max(window.devicePixelRatio, 2);
const globalOutputScale = Math.max(window.devicePixelRatio, 1);

const defaultMaxPixel = 14745600;

Expand Down

1 comment on commit 40a5678

@vercel
Copy link

@vercel vercel bot commented on 40a5678 Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.