|
@@ -2364,17 +2364,15 @@ class ComPDFKitViewer {
|
|
|
}
|
|
|
);
|
|
|
|
|
|
- if (toggleButton) {
|
|
|
- this.pdfSidebar = new PDFSidebar({
|
|
|
- elements: {
|
|
|
- toggleButton
|
|
|
- },
|
|
|
- pdfViewer: this.pdfViewer,
|
|
|
- pdfThumbnailViewer: this.pdfThumbnailViewer,
|
|
|
- eventBus: this.eventBus
|
|
|
- });
|
|
|
- this.pdfSidebar.onToggled = this.forceRendering.bind(this);
|
|
|
- }
|
|
|
+ this.pdfSidebar = new PDFSidebar({
|
|
|
+ elements: {
|
|
|
+ toggleButton
|
|
|
+ },
|
|
|
+ pdfViewer: this.pdfViewer,
|
|
|
+ pdfThumbnailViewer: this.pdfThumbnailViewer,
|
|
|
+ eventBus: this.eventBus
|
|
|
+ });
|
|
|
+ this.pdfSidebar.onToggled = this.forceRendering.bind(this);
|
|
|
|
|
|
this.contentEditManager = new ContentEditManager(this);
|
|
|
}
|
|
@@ -2408,7 +2406,7 @@ class ComPDFKitViewer {
|
|
|
}
|
|
|
|
|
|
this.pdfViewer.forceRendering()
|
|
|
- this.pdfSidebar.isOpen && this.pdfThumbnailViewer.forceRendering();
|
|
|
+ this.pdfSidebar?.isOpen && this.pdfThumbnailViewer.forceRendering();
|
|
|
}
|
|
|
|
|
|
requestFullScreenMode() {
|
|
@@ -2438,18 +2436,22 @@ class ComPDFKitViewer {
|
|
|
if (this.pdfViewer.isInPresentationMode) {
|
|
|
return;
|
|
|
}
|
|
|
+ const oldPage = this.page;
|
|
|
this.pdfViewer.increaseScale({
|
|
|
drawingDelay: 400
|
|
|
});
|
|
|
+ this.page = oldPage;
|
|
|
}
|
|
|
|
|
|
zoomOut(steps) {
|
|
|
if (this.pdfViewer.isInPresentationMode) {
|
|
|
return;
|
|
|
}
|
|
|
+ const oldPage = this.page;
|
|
|
this.pdfViewer.decreaseScale({
|
|
|
drawingDelay: 400
|
|
|
});
|
|
|
+ this.page = oldPage;
|
|
|
}
|
|
|
|
|
|
nextPage() {
|
|
@@ -2764,7 +2766,9 @@ class ComPDFKitViewer {
|
|
|
}
|
|
|
}
|
|
|
webViewerScaleChanged(value) {
|
|
|
+ const oldPage = this.page;
|
|
|
this.pdfViewer.currentScaleValue = value;
|
|
|
+ this.page = oldPage;
|
|
|
}
|
|
|
webViewerRotateCw() {
|
|
|
this.rotatePages(90);
|