@progress/kendo-pdfviewer-common 0.2.2 → 0.2.3-dev.202310040707
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/utils.js +19 -1
- package/dist/es2015/utils.js +19 -1
- package/dist/npm/utils.d.ts +19 -1
- package/dist/npm/utils.js +19 -1
- package/package.json +2 -2
package/dist/es/utils.js
CHANGED
|
@@ -298,9 +298,27 @@ export const calculateZoomLevel = (zoomLevel, zoomLevelType, currentZoom, dom) =
|
|
|
298
298
|
};
|
|
299
299
|
/**
|
|
300
300
|
* Scrolls the PDFViewer document to the passed page number.
|
|
301
|
-
*
|
|
302
301
|
* @param rootElement The root HTML element of the PDFViewer component.
|
|
303
302
|
* @param pageNumber The page number.
|
|
303
|
+
* @example
|
|
304
|
+
* ```jsx
|
|
305
|
+
* function App() {
|
|
306
|
+
* const pdfRef = React.useRef(null);
|
|
307
|
+
* const handleClick = () => {
|
|
308
|
+
* scrollToPage(pdfRef.current.element, 3);
|
|
309
|
+
* };
|
|
310
|
+
* return (
|
|
311
|
+
* <div>
|
|
312
|
+
* <Button onClick={handleClick} >
|
|
313
|
+
* Scroll to Page 3
|
|
314
|
+
* </Button>
|
|
315
|
+
* <PDFViewer
|
|
316
|
+
* ref={pdfRef}
|
|
317
|
+
* />
|
|
318
|
+
* </div>
|
|
319
|
+
* )
|
|
320
|
+
* }
|
|
321
|
+
* ```
|
|
304
322
|
*/
|
|
305
323
|
export const scrollToPage = (rootElement, pageNumber) => {
|
|
306
324
|
const pages = rootElement.querySelectorAll('.k-page');
|
package/dist/es2015/utils.js
CHANGED
|
@@ -298,9 +298,27 @@ export const calculateZoomLevel = (zoomLevel, zoomLevelType, currentZoom, dom) =
|
|
|
298
298
|
};
|
|
299
299
|
/**
|
|
300
300
|
* Scrolls the PDFViewer document to the passed page number.
|
|
301
|
-
*
|
|
302
301
|
* @param rootElement The root HTML element of the PDFViewer component.
|
|
303
302
|
* @param pageNumber The page number.
|
|
303
|
+
* @example
|
|
304
|
+
* ```jsx
|
|
305
|
+
* function App() {
|
|
306
|
+
* const pdfRef = React.useRef(null);
|
|
307
|
+
* const handleClick = () => {
|
|
308
|
+
* scrollToPage(pdfRef.current.element, 3);
|
|
309
|
+
* };
|
|
310
|
+
* return (
|
|
311
|
+
* <div>
|
|
312
|
+
* <Button onClick={handleClick} >
|
|
313
|
+
* Scroll to Page 3
|
|
314
|
+
* </Button>
|
|
315
|
+
* <PDFViewer
|
|
316
|
+
* ref={pdfRef}
|
|
317
|
+
* />
|
|
318
|
+
* </div>
|
|
319
|
+
* )
|
|
320
|
+
* }
|
|
321
|
+
* ```
|
|
304
322
|
*/
|
|
305
323
|
export const scrollToPage = (rootElement, pageNumber) => {
|
|
306
324
|
const pages = rootElement.querySelectorAll('.k-page');
|
package/dist/npm/utils.d.ts
CHANGED
|
@@ -82,9 +82,27 @@ export declare const goToPreviousSearchMatch: (ref: any) => void;
|
|
|
82
82
|
export declare const calculateZoomLevel: (zoomLevel: number, zoomLevelType: string, currentZoom: number, dom: HTMLDivElement) => number;
|
|
83
83
|
/**
|
|
84
84
|
* Scrolls the PDFViewer document to the passed page number.
|
|
85
|
-
*
|
|
86
85
|
* @param rootElement The root HTML element of the PDFViewer component.
|
|
87
86
|
* @param pageNumber The page number.
|
|
87
|
+
* @example
|
|
88
|
+
* ```jsx
|
|
89
|
+
* function App() {
|
|
90
|
+
* const pdfRef = React.useRef(null);
|
|
91
|
+
* const handleClick = () => {
|
|
92
|
+
* scrollToPage(pdfRef.current.element, 3);
|
|
93
|
+
* };
|
|
94
|
+
* return (
|
|
95
|
+
* <div>
|
|
96
|
+
* <Button onClick={handleClick} >
|
|
97
|
+
* Scroll to Page 3
|
|
98
|
+
* </Button>
|
|
99
|
+
* <PDFViewer
|
|
100
|
+
* ref={pdfRef}
|
|
101
|
+
* />
|
|
102
|
+
* </div>
|
|
103
|
+
* )
|
|
104
|
+
* }
|
|
105
|
+
* ```
|
|
88
106
|
*/
|
|
89
107
|
export declare const scrollToPage: (rootElement: HTMLElement, pageNumber: number) => void;
|
|
90
108
|
/**
|
package/dist/npm/utils.js
CHANGED
|
@@ -300,9 +300,27 @@ exports.calculateZoomLevel = (zoomLevel, zoomLevelType, currentZoom, dom) => {
|
|
|
300
300
|
};
|
|
301
301
|
/**
|
|
302
302
|
* Scrolls the PDFViewer document to the passed page number.
|
|
303
|
-
*
|
|
304
303
|
* @param rootElement The root HTML element of the PDFViewer component.
|
|
305
304
|
* @param pageNumber The page number.
|
|
305
|
+
* @example
|
|
306
|
+
* ```jsx
|
|
307
|
+
* function App() {
|
|
308
|
+
* const pdfRef = React.useRef(null);
|
|
309
|
+
* const handleClick = () => {
|
|
310
|
+
* scrollToPage(pdfRef.current.element, 3);
|
|
311
|
+
* };
|
|
312
|
+
* return (
|
|
313
|
+
* <div>
|
|
314
|
+
* <Button onClick={handleClick} >
|
|
315
|
+
* Scroll to Page 3
|
|
316
|
+
* </Button>
|
|
317
|
+
* <PDFViewer
|
|
318
|
+
* ref={pdfRef}
|
|
319
|
+
* />
|
|
320
|
+
* </div>
|
|
321
|
+
* )
|
|
322
|
+
* }
|
|
323
|
+
* ```
|
|
306
324
|
*/
|
|
307
325
|
exports.scrollToPage = (rootElement, pageNumber) => {
|
|
308
326
|
const pages = rootElement.querySelectorAll('.k-page');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-pdfviewer-common",
|
|
3
3
|
"description": "Kendo UI TypeScript package exporting functions for PDFViewer component",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3-dev.202310040707",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Kendo UI"
|
|
7
7
|
],
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@progress/kendo-file-saver": "^1.1.1"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"pdfjs-dist": "3.
|
|
31
|
+
"pdfjs-dist": "3.11.174",
|
|
32
32
|
"tslib": "^2.4.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|