@syncfusion/ej2-pdfviewer 17.3.59-4568 → 17.3.60-4568

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.
@@ -9800,8 +9800,14 @@ var TextMarkupAnnotation = /** @class */ (function () {
9800
9800
  }
9801
9801
  annotCanvas.style.width = '';
9802
9802
  annotCanvas.style.height = '';
9803
- annotCanvas.width = this.pdfViewerBase.pageSize[pageNumber].width * this.pdfViewerBase.getZoomFactor();
9804
- annotCanvas.height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor();
9803
+ if (this.pdfViewer.restrictZoomRequest) {
9804
+ annotCanvas.style.width = this.pdfViewerBase.pageSize[pageNumber].width * this.pdfViewerBase.getZoomFactor() + 'px';
9805
+ annotCanvas.style.height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor() + 'px';
9806
+ }
9807
+ else {
9808
+ annotCanvas.width = this.pdfViewerBase.pageSize[pageNumber].width * this.pdfViewerBase.getZoomFactor();
9809
+ annotCanvas.height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor();
9810
+ }
9805
9811
  this.renderTextMarkupAnnotations(null, pageNumber, annotCanvas, this.pdfViewerBase.getZoomFactor());
9806
9812
  }
9807
9813
  };
@@ -22376,6 +22382,9 @@ var PdfViewerBase = /** @class */ (function () {
22376
22382
  // tslint:disable-next-line
22377
22383
  PdfViewerBase.prototype.getStoredData = function (pageIndex) {
22378
22384
  var zoomFactor = this.retrieveCurrentZoomFactor();
22385
+ if (this.pdfViewer.restrictZoomRequest && !this.pdfViewer.tileRenderingSettings.enableTileRendering) {
22386
+ zoomFactor = 1;
22387
+ }
22379
22388
  // tslint:disable-next-line
22380
22389
  var storedData = this.getWindowSessionStorage(pageIndex, zoomFactor) ? this.getWindowSessionStorage(pageIndex, zoomFactor) : this.getPinchZoomPage(pageIndex);
22381
22390
  // tslint:disable-next-line
@@ -27047,9 +27056,16 @@ var Magnification = /** @class */ (function () {
27047
27056
  var pageNumber = parseInt(pageDivs[i].id.split('_pageCanvas_')[1]);
27048
27057
  var pageWidth = this.pdfViewerBase.pageSize[pageNumber].width;
27049
27058
  if ((viewPortWidth < pageWidth) && this.pdfViewer.tileRenderingSettings.enableTileRendering) {
27050
- pageDivs[i].width = pageWidth * this.pdfViewerBase.getZoomFactor();
27051
- // tslint:disable-next-line:max-line-length
27052
- pageDivs[i].height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor();
27059
+ if (this.pdfViewer.restrictZoomRequest) {
27060
+ pageDivs[i].style.width = pageWidth * this.pdfViewerBase.getZoomFactor() + 'px';
27061
+ // eslint-disable-next-line max-len
27062
+ pageDivs[i].style.height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor() + 'px';
27063
+ }
27064
+ else {
27065
+ pageDivs[i].width = pageWidth * this.pdfViewerBase.getZoomFactor();
27066
+ // eslint-disable-next-line max-len
27067
+ pageDivs[i].height = this.pdfViewerBase.pageSize[pageNumber].height * this.pdfViewerBase.getZoomFactor();
27068
+ }
27053
27069
  }
27054
27070
  }
27055
27071
  if (this.pdfViewerBase.textLayer) {
@@ -27152,11 +27168,11 @@ var Magnification = /** @class */ (function () {
27152
27168
  var canvas = this.pdfViewerBase.getElement('_pageCanvas_' + i);
27153
27169
  var width = this.pdfViewerBase.pageSize[i].width * this.zoomFactor;
27154
27170
  var height = this.pdfViewerBase.pageSize[i].height * this.zoomFactor;
27155
- if (canvas) {
27171
+ if (canvas && !this.pdfViewer.restrictZoomRequest) {
27156
27172
  // tslint:disable-next-line:max-line-length
27157
27173
  this.pdfViewerBase.renderPageCanvas(this.pdfViewerBase.getElement('_pageDiv_' + i), width, height, i, 'none');
27158
27174
  }
27159
- else {
27175
+ else if (!this.pdfViewer.restrictZoomRequest) {
27160
27176
  this.pdfViewerBase.renderPageElement(i);
27161
27177
  }
27162
27178
  }
@@ -37220,6 +37236,9 @@ var PdfViewer = /** @class */ (function (_super) {
37220
37236
  __decorate$2([
37221
37237
  Property(true)
37222
37238
  ], PdfViewer.prototype, "enableHandwrittenSignature", void 0);
37239
+ __decorate$2([
37240
+ Property(false)
37241
+ ], PdfViewer.prototype, "restrictZoomRequest", void 0);
37223
37242
  __decorate$2([
37224
37243
  Property('CurrentTab')
37225
37244
  ], PdfViewer.prototype, "hyperlinkOpenState", void 0);