@react-native-ohos/react-native-pdf 6.8.0-rc.2 → 6.8.0-rc.3
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.
|
@@ -33,6 +33,7 @@ import { pdfService, pdfViewManager, PdfView } from '@kit.PDFKit'
|
|
|
33
33
|
import { common } from '@kit.AbilityKit';
|
|
34
34
|
import { ON_PROGRESS_CHANGE } from './types';
|
|
35
35
|
import Logger from '../../Logger';
|
|
36
|
+
import deviceInfo from '@ohos.deviceInfo';
|
|
36
37
|
|
|
37
38
|
export const PDF_VIEW_TYPE: string = "RTNPdfView";
|
|
38
39
|
|
|
@@ -130,6 +131,17 @@ export struct RTNPdfView {
|
|
|
130
131
|
.then((res: pdfService.ParseResult) => {
|
|
131
132
|
switch (res) {
|
|
132
133
|
case pdfService.ParseResult.PARSE_SUCCESS:
|
|
134
|
+
let apiVersion = deviceInfo?.sdkApiVersion;
|
|
135
|
+
if(apiVersion >= 22){
|
|
136
|
+
let pdfController: ESObject = this.pdfController;
|
|
137
|
+
const SELF_FIRST = 1;
|
|
138
|
+
pdfController.setNestedScroll({
|
|
139
|
+
scrollUp: SELF_FIRST,
|
|
140
|
+
scrollDown: SELF_FIRST,
|
|
141
|
+
scrollLeft: SELF_FIRST,
|
|
142
|
+
scrollRight: SELF_FIRST,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
133
145
|
this.pdfController.setPageSpacing(spacing, spacing); //由于rn侧值传递一个参数,故此处默认为连续滚动模式。设置上下面的间距。
|
|
134
146
|
this.pdfController.setPageZoom(scale);
|
|
135
147
|
const pageCount: number = this.pdfController.getPageCount();
|
package/harmony/pdfview.har
CHANGED
|
Binary file
|
package/package.json
CHANGED