@progress/kendo-pdfviewer-common 0.2.3 → 0.2.4
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 +1 -19
- package/dist/es2015/utils.js +1 -19
- package/dist/npm/utils.d.ts +1 -19
- package/dist/npm/utils.js +1 -19
- package/package.json +1 -1
package/dist/es/utils.js
CHANGED
|
@@ -286,27 +286,9 @@ export const calculateZoomLevel = (zoomLevel, zoomLevelType, currentZoom, dom) =
|
|
|
286
286
|
};
|
|
287
287
|
/**
|
|
288
288
|
* Scrolls the PDFViewer document to the passed page number.
|
|
289
|
+
*
|
|
289
290
|
* @param rootElement The root HTML element of the PDFViewer component.
|
|
290
291
|
* @param pageNumber The page number.
|
|
291
|
-
* @example
|
|
292
|
-
* ```jsx
|
|
293
|
-
* function App() {
|
|
294
|
-
* const pdfRef = React.useRef(null);
|
|
295
|
-
* const handleClick = () => {
|
|
296
|
-
* scrollToPage(pdfRef.current.element, 3);
|
|
297
|
-
* };
|
|
298
|
-
* return (
|
|
299
|
-
* <div>
|
|
300
|
-
* <Button onClick={handleClick} >
|
|
301
|
-
* Scroll to Page 3
|
|
302
|
-
* </Button>
|
|
303
|
-
* <PDFViewer
|
|
304
|
-
* ref={pdfRef}
|
|
305
|
-
* />
|
|
306
|
-
* </div>
|
|
307
|
-
* )
|
|
308
|
-
* }
|
|
309
|
-
* ```
|
|
310
292
|
*/
|
|
311
293
|
export const scrollToPage = (rootElement, pageNumber) => {
|
|
312
294
|
const pages = rootElement.querySelectorAll('.k-page');
|
package/dist/es2015/utils.js
CHANGED
|
@@ -286,27 +286,9 @@ export const calculateZoomLevel = (zoomLevel, zoomLevelType, currentZoom, dom) =
|
|
|
286
286
|
};
|
|
287
287
|
/**
|
|
288
288
|
* Scrolls the PDFViewer document to the passed page number.
|
|
289
|
+
*
|
|
289
290
|
* @param rootElement The root HTML element of the PDFViewer component.
|
|
290
291
|
* @param pageNumber The page number.
|
|
291
|
-
* @example
|
|
292
|
-
* ```jsx
|
|
293
|
-
* function App() {
|
|
294
|
-
* const pdfRef = React.useRef(null);
|
|
295
|
-
* const handleClick = () => {
|
|
296
|
-
* scrollToPage(pdfRef.current.element, 3);
|
|
297
|
-
* };
|
|
298
|
-
* return (
|
|
299
|
-
* <div>
|
|
300
|
-
* <Button onClick={handleClick} >
|
|
301
|
-
* Scroll to Page 3
|
|
302
|
-
* </Button>
|
|
303
|
-
* <PDFViewer
|
|
304
|
-
* ref={pdfRef}
|
|
305
|
-
* />
|
|
306
|
-
* </div>
|
|
307
|
-
* )
|
|
308
|
-
* }
|
|
309
|
-
* ```
|
|
310
292
|
*/
|
|
311
293
|
export const scrollToPage = (rootElement, pageNumber) => {
|
|
312
294
|
const pages = rootElement.querySelectorAll('.k-page');
|
package/dist/npm/utils.d.ts
CHANGED
|
@@ -82,27 +82,9 @@ 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
|
+
*
|
|
85
86
|
* @param rootElement The root HTML element of the PDFViewer component.
|
|
86
87
|
* @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
|
-
* ```
|
|
106
88
|
*/
|
|
107
89
|
export declare const scrollToPage: (rootElement: HTMLElement, pageNumber: number) => void;
|
|
108
90
|
/**
|
package/dist/npm/utils.js
CHANGED
|
@@ -288,27 +288,9 @@ exports.calculateZoomLevel = (zoomLevel, zoomLevelType, currentZoom, dom) => {
|
|
|
288
288
|
};
|
|
289
289
|
/**
|
|
290
290
|
* Scrolls the PDFViewer document to the passed page number.
|
|
291
|
+
*
|
|
291
292
|
* @param rootElement The root HTML element of the PDFViewer component.
|
|
292
293
|
* @param pageNumber The page number.
|
|
293
|
-
* @example
|
|
294
|
-
* ```jsx
|
|
295
|
-
* function App() {
|
|
296
|
-
* const pdfRef = React.useRef(null);
|
|
297
|
-
* const handleClick = () => {
|
|
298
|
-
* scrollToPage(pdfRef.current.element, 3);
|
|
299
|
-
* };
|
|
300
|
-
* return (
|
|
301
|
-
* <div>
|
|
302
|
-
* <Button onClick={handleClick} >
|
|
303
|
-
* Scroll to Page 3
|
|
304
|
-
* </Button>
|
|
305
|
-
* <PDFViewer
|
|
306
|
-
* ref={pdfRef}
|
|
307
|
-
* />
|
|
308
|
-
* </div>
|
|
309
|
-
* )
|
|
310
|
-
* }
|
|
311
|
-
* ```
|
|
312
294
|
*/
|
|
313
295
|
exports.scrollToPage = (rootElement, pageNumber) => {
|
|
314
296
|
const pages = rootElement.querySelectorAll('.k-page');
|