@progress/kendo-pdfviewer-common 0.2.7-dev.202401031409 → 0.2.8-dev.202401261100
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/README.md +26 -3
- package/dist/es/utils.js +11 -0
- package/dist/es2015/utils.js +11 -0
- package/dist/npm/utils.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
## Professional Grade UI Components
|
|
2
2
|
|
|
3
|
-
This package is part of the [Kendo UI for Angular](
|
|
3
|
+
This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/) and [KendoReact](https://www.telerik.com/kendo-react-ui/components/#react-components) suites.
|
|
4
4
|
|
|
5
5
|
## License
|
|
6
6
|
|
|
7
|
-
This is commercial software. To use it, you need to agree to the [**Telerik End User License Agreement for Kendo UI
|
|
7
|
+
This is commercial software. To use it, you need to agree to the [**Telerik End User License Agreement for Kendo UI** (for Kendo UI for Angular)](http://www.telerik.com/purchase/license-agreement/kendo-ui) or to the [**End User License Agreement for Progress KendoReact** (for KendoReact)](https://www.telerik.com/purchase/license-agreement/progress-kendoreact). If you do not own a commercial license, this file shall be governed by the trial license terms.
|
|
8
8
|
|
|
9
9
|
All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui.
|
|
10
|
+
|
|
11
|
+
## Kendo UI for Angular Resources and Feedback
|
|
12
|
+
|
|
13
|
+
- [Get Started](https://www.telerik.com/kendo-angular-ui/getting-started)
|
|
14
|
+
- [Component References](https://www.telerik.com/kendo-angular-ui/components)
|
|
15
|
+
- [Blogs](http://www.telerik.com/blogs/kendo-ui)
|
|
16
|
+
- [FAQ](https://www.telerik.com/kendo-angular-ui/components/faq/)
|
|
17
|
+
- [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
|
|
18
|
+
- [Feedback Portal](http://kendoui-feedback.telerik.com/forums/555517-kendo-ui-for-angular-2-feedback)
|
|
19
|
+
- [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
|
|
20
|
+
|
|
21
|
+
## KendoReact Resources and Feedback
|
|
22
|
+
|
|
23
|
+
- [Get Started](https://www.telerik.com/kendo-react-ui/getting-started)
|
|
24
|
+
- [Component References](https://www.telerik.com/kendo-react-ui/components/#react-components)
|
|
25
|
+
- [Blogs](http://www.telerik.com/blogs/kendo-ui)
|
|
26
|
+
- [GitHub Issues](https://github.com/telerik/kendo-react/issues)
|
|
27
|
+
- [Feedback Portal](http://kendoui-feedback.telerik.com/forums/908425-kendo-ui-for-react-feedback)
|
|
28
|
+
- [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-react-ui)
|
|
29
|
+
|
|
30
|
+
*Copyright © 2023 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
|
|
31
|
+
|
|
32
|
+
*Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
|
package/dist/es/utils.js
CHANGED
|
@@ -192,6 +192,12 @@ const createElement = function (name, className, styles) {
|
|
|
192
192
|
Object.keys(styles).forEach((key) => (element.style[key] = styles[key]));
|
|
193
193
|
return element;
|
|
194
194
|
};
|
|
195
|
+
const transforms = {
|
|
196
|
+
'0': '',
|
|
197
|
+
'90': 'rotate(90deg) translateY(-100%)',
|
|
198
|
+
'180': 'rotate(180deg) translate(-100%, -100%)',
|
|
199
|
+
'270': 'rotate(270deg) translateX(-100%)'
|
|
200
|
+
};
|
|
195
201
|
const renderPage = (page, zoom, error) => {
|
|
196
202
|
const { canvasContext, viewport, pageElement, styles } = createCanvas(page, zoom, 'k-page');
|
|
197
203
|
page.render({ canvasContext, viewport })
|
|
@@ -207,6 +213,11 @@ const renderPage = (page, zoom, error) => {
|
|
|
207
213
|
.promise.then(() => {
|
|
208
214
|
textLayer.style.width = textLayer.style.width.replace(/px/g, 'pt');
|
|
209
215
|
textLayer.style.height = textLayer.style.height.replace(/px/g, 'pt');
|
|
216
|
+
const rotation = textLayer.getAttribute('data-main-rotation') || '0';
|
|
217
|
+
if (transforms[rotation]) {
|
|
218
|
+
textLayer.style.transform = transforms[rotation];
|
|
219
|
+
textLayer.style.transformOrigin = 'top left';
|
|
220
|
+
}
|
|
210
221
|
textLayer.querySelectorAll('span').forEach((el) => {
|
|
211
222
|
if (el.style.fontSize) {
|
|
212
223
|
el.style.fontSize = el.style.fontSize.replace(/px/g, 'pt');
|
package/dist/es2015/utils.js
CHANGED
|
@@ -192,6 +192,12 @@ const createElement = function (name, className, styles) {
|
|
|
192
192
|
Object.keys(styles).forEach((key) => (element.style[key] = styles[key]));
|
|
193
193
|
return element;
|
|
194
194
|
};
|
|
195
|
+
const transforms = {
|
|
196
|
+
'0': '',
|
|
197
|
+
'90': 'rotate(90deg) translateY(-100%)',
|
|
198
|
+
'180': 'rotate(180deg) translate(-100%, -100%)',
|
|
199
|
+
'270': 'rotate(270deg) translateX(-100%)'
|
|
200
|
+
};
|
|
195
201
|
const renderPage = (page, zoom, error) => {
|
|
196
202
|
const { canvasContext, viewport, pageElement, styles } = createCanvas(page, zoom, 'k-page');
|
|
197
203
|
page.render({ canvasContext, viewport })
|
|
@@ -207,6 +213,11 @@ const renderPage = (page, zoom, error) => {
|
|
|
207
213
|
.promise.then(() => {
|
|
208
214
|
textLayer.style.width = textLayer.style.width.replace(/px/g, 'pt');
|
|
209
215
|
textLayer.style.height = textLayer.style.height.replace(/px/g, 'pt');
|
|
216
|
+
const rotation = textLayer.getAttribute('data-main-rotation') || '0';
|
|
217
|
+
if (transforms[rotation]) {
|
|
218
|
+
textLayer.style.transform = transforms[rotation];
|
|
219
|
+
textLayer.style.transformOrigin = 'top left';
|
|
220
|
+
}
|
|
210
221
|
textLayer.querySelectorAll('span').forEach((el) => {
|
|
211
222
|
if (el.style.fontSize) {
|
|
212
223
|
el.style.fontSize = el.style.fontSize.replace(/px/g, 'pt');
|
package/dist/npm/utils.js
CHANGED
|
@@ -194,6 +194,12 @@ const createElement = function (name, className, styles) {
|
|
|
194
194
|
Object.keys(styles).forEach((key) => (element.style[key] = styles[key]));
|
|
195
195
|
return element;
|
|
196
196
|
};
|
|
197
|
+
const transforms = {
|
|
198
|
+
'0': '',
|
|
199
|
+
'90': 'rotate(90deg) translateY(-100%)',
|
|
200
|
+
'180': 'rotate(180deg) translate(-100%, -100%)',
|
|
201
|
+
'270': 'rotate(270deg) translateX(-100%)'
|
|
202
|
+
};
|
|
197
203
|
const renderPage = (page, zoom, error) => {
|
|
198
204
|
const { canvasContext, viewport, pageElement, styles } = createCanvas(page, zoom, 'k-page');
|
|
199
205
|
page.render({ canvasContext, viewport })
|
|
@@ -209,6 +215,11 @@ const renderPage = (page, zoom, error) => {
|
|
|
209
215
|
.promise.then(() => {
|
|
210
216
|
textLayer.style.width = textLayer.style.width.replace(/px/g, 'pt');
|
|
211
217
|
textLayer.style.height = textLayer.style.height.replace(/px/g, 'pt');
|
|
218
|
+
const rotation = textLayer.getAttribute('data-main-rotation') || '0';
|
|
219
|
+
if (transforms[rotation]) {
|
|
220
|
+
textLayer.style.transform = transforms[rotation];
|
|
221
|
+
textLayer.style.transformOrigin = 'top left';
|
|
222
|
+
}
|
|
212
223
|
textLayer.querySelectorAll('span').forEach((el) => {
|
|
213
224
|
if (el.style.fontSize) {
|
|
214
225
|
el.style.fontSize = el.style.fontSize.replace(/px/g, 'pt');
|
package/package.json
CHANGED