Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-pdfviewer

Package Overview
Dependencies
Maintainers
2
Versions
298
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-pdfviewer - npm Package Compare versions

Comparing version 16.4.40-beta to 16.4.42

styles/pdfviewer/icons/_bootstrap-dark.scss

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

## 16.4.40-beta (2018-12-10)
### PDF Viewer

@@ -7,0 +9,0 @@

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 16.4.40-beta
* version : 16.4.42
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-pdfviewer",
"version": "16.4.40-beta",
"version": "16.4.42",
"description": "Essential JS 2 PDF viewer Component",

@@ -11,10 +11,10 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~16.4.40-beta",
"@syncfusion/ej2-data": "~16.4.40-beta",
"@syncfusion/ej2-navigations": "~16.4.40-beta",
"@syncfusion/ej2-inputs": "~16.4.40-beta",
"@syncfusion/ej2-dropdowns": "~16.4.40-beta",
"@syncfusion/ej2-popups": "~16.4.40-beta",
"@syncfusion/ej2-buttons": "~16.4.40-beta",
"@syncfusion/ej2-lists": "~16.4.40-beta"
"@syncfusion/ej2-base": "~16.4.42",
"@syncfusion/ej2-data": "~16.4.42",
"@syncfusion/ej2-navigations": "~16.4.42",
"@syncfusion/ej2-inputs": "~16.4.42",
"@syncfusion/ej2-dropdowns": "~16.4.42",
"@syncfusion/ej2-popups": "~16.4.42",
"@syncfusion/ej2-buttons": "~16.4.42",
"@syncfusion/ej2-lists": "~16.4.42"
},

@@ -21,0 +21,0 @@ "devDependencies": {

@@ -207,2 +207,3 @@ import { PdfViewer, TextLayer, ContextMenu } from '../index';

focusViewerContainer(): void;
private getScrollParent;
private createCorruptedPopup;

@@ -209,0 +210,0 @@ private closeCorruptPopup;

@@ -364,2 +364,5 @@ import { createElement } from '@syncfusion/ej2-base';

_this.pdfViewer.element.removeChild(popupElement);
if (_this.pdfViewer.textSearchModule) {
_this.pdfViewer.textSearch.isMessagePopupOpened = false;
}
}

@@ -366,0 +369,0 @@ });

@@ -40,5 +40,10 @@ import { createElement } from '@syncfusion/ej2-base';

_this.pdfViewerBase.navigationPane.disableBookmarkButton();
if (event.currentTarget.response) {
_this.bookmarks = { bookMark: event.currentTarget.response.Bookmarks };
_this.bookmarksDestination = { bookMarkDestination: event.currentTarget.response.BookmarksDestination };
// tslint:disable-next-line
var data = event.currentTarget.response;
if (data) {
if (typeof data !== 'object') {
data = JSON.parse(data);
}
_this.bookmarks = { bookMark: data.Bookmarks };
_this.bookmarksDestination = { bookMarkDestination: data.BookmarksDestination };
}

@@ -64,3 +69,3 @@ if (_this.bookmarks == null) {

if (this.bookmarkView != null) {
this.bookmarkView.remove();
this.bookmarkView.parentElement.removeChild(this.bookmarkView);
}

@@ -67,0 +72,0 @@ this.bookmarkView = createElement('div', { id: this.pdfViewer.element.id + '_bookmark_view', className: 'e-pv-bookmark-view' });

@@ -122,3 +122,3 @@ var __extends = (this && this.__extends) || (function () {

// tslint:disable-next-line:max-line-length
'No matches': 'Viewer has finished searching the document.No more matches were found',
'No matches': 'Viewer has finished searching the document. No more matches were found',
// tslint:disable-next-line:max-line-length

@@ -125,0 +125,0 @@ 'Server error': 'Web-service is not listening. PDF Viewer depends on web-service for all it\'s features. Please start the web service to continue.'

@@ -10,2 +10,3 @@ import { PdfViewer } from '../index';

private printViewerContainer;
private printImageContainer;
private frameDoc;

@@ -12,0 +13,0 @@ private iframe;

@@ -36,4 +36,4 @@ import { createElement } from '@syncfusion/ej2-base';

if (pageIndex < _this.pdfViewerBase.pageCount) {
var pageWidth = _this.pdfViewerBase.getPageWidth(pageIndex);
var pageHeight = _this.pdfViewerBase.getPageHeight(pageIndex);
var pageWidth = _this.pdfViewerBase.pageSize[pageIndex].width;
var pageHeight = _this.pdfViewerBase.pageSize[pageIndex].height;
_this.pdfViewer.printModule.createRequestForPrint(pageIndex, pageWidth, pageHeight, _this.pdfViewerBase.pageCount);

@@ -52,4 +52,5 @@ }

// tslint: disable-next-line:max-line-length
// set default zoomFactor value.
var jsonObject = { pageNumber: pageIndex, documentId: this.pdfViewerBase.documentId,
hashId: this.pdfViewerBase.hashId, zoomFactor: this.pdfViewerBase.getZoomFactor() };
hashId: this.pdfViewerBase.hashId, zoomFactor: 1 };
request.open('POST', proxy.pdfViewer.serviceUrl + '/PrintImages', false);

@@ -64,3 +65,11 @@ request.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');

pageImage.width = pageWidth;
this.printViewerContainer.appendChild(pageImage);
this.printImageContainer = createElement('div', { id: this.pdfViewer.element.id + '_print_image_container' + pageIndex });
if (pageHeight < pageWidth) {
this.printImageContainer.style.height = pageWidth + 'px';
pageImage.height = pageWidth;
this.printImageContainer.style.width = pageHeight + 'px';
pageImage.width = pageHeight;
}
this.printImageContainer.appendChild(pageImage);
this.printViewerContainer.appendChild(this.printImageContainer);
};

@@ -77,4 +86,6 @@ Print.prototype.printWindowOpen = function () {

this.frameDoc.document.write('<html moznomarginboxes mozdisallowselectionprint><head><style>html, body { height: 100%; }'
+ ' img { height: 100%; width: 100%; display: block; }@media print { body { margin: 0cm; }img { box-sizing: border-box; }br,'
+ ' button { display: none; }} @page{margin:0mm; size:auto;}</style></head><body><center class="loader">');
+ ' img { height: 100%; width: 100%; display: block; }@media print { body { margin: 0cm; }'
+ ' img { width:98%; max-width: 1048px; box-sizing: border-box; }br, button { display: none; }'
// set default page Height and page Width for A4 size.
+ ' div{ page-break-inside: avoid; }} @page{margin:0mm; size: 816px 1056px;}</style></head><body><center class="loader">');
}

@@ -87,3 +98,5 @@ else {

+ '<style>html, body { height: 99%; } img { height: 99%; width: 100%; }@media print { body { margin: 0cm; }'
+ 'img { box-sizing: border-box; }br, button { display: none; }} @page{margin:0mm; size:auto;}</style></head><body><center>');
+ 'img { width:98%; max-width: 1048px; box-sizing: border-box; }br, button { display: none; } '
// set default page Height and page Width for A4 size.
+ 'div{ page-break-inside: avoid; }} @page{margin:0mm; size: 816px 1056px;}</style></head><body><center>');
}

@@ -90,0 +103,0 @@ this.frameDoc.document.write(this.printViewerContainer.outerHTML);

@@ -32,2 +32,6 @@ import { PdfViewer, PdfViewerBase } from '../index';

*/
isMessagePopupOpened: boolean;
/**
* @private
*/
constructor(pdfViewer: PdfViewer, pdfViewerBase: PdfViewerBase);

@@ -92,2 +96,3 @@ /**

private prevButtonOnClick;
private onMessageBoxOpen;
/**

@@ -94,0 +99,0 @@ * Searches the target text in the PDF document and highlights the occurrences in the pages

@@ -31,2 +31,6 @@ import { createElement } from '@syncfusion/ej2-base';

this.tempElementStorage = new Array();
/**
* @private
*/
this.isMessagePopupOpened = false;
this.checkBoxOnChange = function (event) {

@@ -91,3 +95,3 @@ if (event.checked) {

// tslint:disable-next-line:max-line-length
this.searchBtn = createElement('span', { id: this.pdfViewer.element.id + '_search_box-icon', className: 'e-input-group-icon e-pv-search-icon' });
this.searchBtn = createElement('span', { id: this.pdfViewer.element.id + '_search_box-icon', className: 'e-input-group-icon e-input-search-group-icon e-pv-search-icon' });
searchInputContainer.appendChild(this.searchInput);

@@ -298,3 +302,6 @@ searchInputContainer.appendChild(this.searchBtn);

if (this.searchCollection.length > 0 && (this.searchIndex === 0 || this.searchIndex === -1) && (this.searchPageIndex) === this.currentSearchIndex) {
this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant('No matches'));
if (!this.isMessagePopupOpened) {
this.onMessageBoxOpen();
this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant('No matches'));
}
this.searchPageIndex = this.getSearchPage(this.pdfViewerBase.currentPageNumber - 1);

@@ -321,5 +328,10 @@ this.searchedPages = [];

var searchPageIndex = this.getSearchPage(pageIndex);
if (!this.searchCollection[this.searchPageIndex] && this.searchCollection.length === 0) {
// tslint:disable-next-line:max-line-length
if (!this.searchCollection[this.searchPageIndex] && this.searchCollection.length === 0 && this.searchedPages.length === this.pdfViewerBase.pageCount) {
// tslint:disable-next-line:max-line-length
this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant('No matches'));
if (!this.isMessagePopupOpened) {
this.onMessageBoxOpen();
this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant('No matches'));
}
// tslint:disable-next-line:max-line-length
}

@@ -329,3 +341,6 @@ else if (this.searchCollection.length > 0 && (this.searchIndex === 0 || this.searchIndex === -1) && (searchPageIndex) === this.currentSearchIndex) {

// tslint:disable-next-line:max-line-length
this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant('No matches'));
if (!this.isMessagePopupOpened) {
this.onMessageBoxOpen();
this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant('No matches'));
}
this.searchPageIndex = this.getSearchPage(this.pdfViewerBase.currentPageNumber - 1);

@@ -336,3 +351,6 @@ this.searchedPages = [];

else {
this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant('No matches'));
if (!this.isMessagePopupOpened) {
this.onMessageBoxOpen();
this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant('No matches'));
}
this.searchPageIndex = this.getSearchPage(this.pdfViewerBase.currentPageNumber - 1);

@@ -863,2 +881,6 @@ this.searchedPages = [];

};
TextSearch.prototype.onMessageBoxOpen = function () {
this.pdfViewerBase.getElement('_search_input').blur();
this.isMessagePopupOpened = true;
};
/**

@@ -865,0 +887,0 @@ * Searches the target text in the PDF document and highlights the occurrences in the pages

@@ -136,2 +136,3 @@ import { PdfViewer, PdfViewerBase } from '../index';

stichSelectionOnScroll(currentPageNumber: number): void;
private extendSelectionStich;
/**

@@ -174,2 +175,3 @@ * @private

private onRightTouchSelectElementTouchMove;
private getNodeElement;
private isTouchedWithinContainer;

@@ -181,2 +183,3 @@ private onTouchElementScroll;

private getTextLastLength;
private getNodeElementFromNode;
/**

@@ -183,0 +186,0 @@ * @private

@@ -37,2 +37,3 @@ import { PdfViewer, PdfViewerBase } from '../index';

createRequestForThumbnails(): Promise<any>;
private requestCreation;
/**

@@ -39,0 +40,0 @@ * @private

@@ -86,44 +86,58 @@ import { createElement } from '@syncfusion/ej2-base';

// tslint:disable-next-line
return new Promise(
var isIE = !!document.documentMode;
if (!isIE) {
// tslint:disable-next-line
return new Promise(
// tslint:disable-next-line
function (renderThumbnailImage, reject) {
proxy.requestCreation(proxy);
});
}
else {
this.requestCreation(proxy);
return null;
}
};
ThumbnailView.prototype.requestCreation = function (proxy) {
var _this = this;
if (!proxy.isThumbnailCompleted) {
// tslint:disable-next-line:max-line-length
proxy.thumbnailLimit = proxy.thumbnailLimit < proxy.pdfViewer.pageCount ? proxy.thumbnailLimit : proxy.pdfViewer.pageCount;
if (proxy.thumbnailLimit !== proxy.pdfViewer.pageCount) {
proxy.isThumbnailCompleted = false;
proxy.startIndex = 0;
}
}
else {
proxy.startIndex = proxy.thumbnailLimit;
// tslint:disable-next-line:max-line-length
proxy.thumbnailLimit = proxy.startIndex + proxy.thumbnailThreshold < proxy.pdfViewer.pageCount ? proxy.startIndex + proxy.thumbnailThreshold : proxy.pdfViewer.pageCount;
}
var request = new XMLHttpRequest();
// tslint:disable-next-line:max-line-length
var jsonObject = { startPage: proxy.startIndex, endPage: proxy.thumbnailLimit, sizeX: 99.7, sizeY: 141, hashId: proxy.pdfViewerBase.hashId };
request.open('POST', proxy.pdfViewer.serviceUrl + '/' + proxy.pdfViewer.serverActionSettings.renderThumbnail);
request.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
request.responseType = 'json';
request.send(JSON.stringify(jsonObject));
// tslint:disable-next-line
function (renderThumbnailImage, reject) {
var _this = this;
if (!proxy.isThumbnailCompleted) {
// tslint:disable-next-line:max-line-length
proxy.thumbnailLimit = proxy.thumbnailLimit < proxy.pdfViewer.pageCount ? proxy.thumbnailLimit : proxy.pdfViewer.pageCount;
if (proxy.thumbnailLimit !== proxy.pdfViewer.pageCount) {
proxy.isThumbnailCompleted = false;
proxy.startIndex = 0;
request.onreadystatechange = function (event) {
if (request.readyState === 4 && request.status === 200) {
// tslint:disable-next-line
var data = event.currentTarget.response;
if (typeof data !== 'object') {
data = JSON.parse(data);
}
proxy.renderThumbnailImage(data);
if (!proxy.isThumbnailCompleted) {
proxy.startIndex = proxy.thumbnailLimit;
proxy.isThumbnailCompleted = true;
}
}
else {
proxy.startIndex = proxy.thumbnailLimit;
// tslint:disable-next-line:max-line-length
proxy.thumbnailLimit = proxy.startIndex + proxy.thumbnailThreshold < proxy.pdfViewer.pageCount ? proxy.startIndex + proxy.thumbnailThreshold : proxy.pdfViewer.pageCount;
}
var request = new XMLHttpRequest();
// tslint:disable-next-line:max-line-length
var jsonObject = { startPage: proxy.startIndex, endPage: proxy.thumbnailLimit, sizeX: 99.7, sizeY: 141, hashId: proxy.pdfViewerBase.hashId };
request.open('POST', proxy.pdfViewer.serviceUrl + '/' + proxy.pdfViewer.serverActionSettings.renderThumbnail);
request.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
request.responseType = 'json';
request.send(JSON.stringify(jsonObject));
// tslint:disable-next-line
request.onreadystatechange = function (event) {
if (request.readyState === 4 && request.status === 200) {
// tslint:disable-next-line
var data = event.currentTarget.response;
proxy.renderThumbnailImage(data);
if (!proxy.isThumbnailCompleted) {
proxy.startIndex = proxy.thumbnailLimit;
proxy.isThumbnailCompleted = true;
}
}
};
// tslint:disable-next-line
request.onerror = function (event) {
_this.pdfViewerBase.openNotificationPopup();
proxy.pdfViewer.fireAjaxRequestFailed(request.status, request.statusText);
};
});
};
// tslint:disable-next-line
request.onerror = function (event) {
_this.pdfViewerBase.openNotificationPopup();
proxy.pdfViewer.fireAjaxRequestFailed(request.status, request.statusText);
};
};

@@ -143,9 +157,11 @@ /**

}
if (this.previousElement) {
this.previousElement.classList.remove('e-pv-thumbnail-selection');
this.previousElement.classList.remove('e-pv-thumbnail-focus');
this.previousElement.classList.remove('e-pv-thumbnail-hover');
this.previousElement.classList.add('e-pv-thumbnail-selection-ring');
if (!this.isThumbnailClicked) {
if (this.previousElement) {
this.previousElement.classList.remove('e-pv-thumbnail-selection');
this.previousElement.classList.remove('e-pv-thumbnail-focus');
this.previousElement.classList.remove('e-pv-thumbnail-hover');
this.previousElement.classList.add('e-pv-thumbnail-selection-ring');
}
this.setFocusStyle(thumbnailDiv, pageNumber);
}
this.setFocusStyle(thumbnailDiv, pageNumber);
this.previousElement = thumbnailDiv.children[0];

@@ -225,3 +241,10 @@ }

if (this.thumbnailLimit !== this.pdfViewerBase.pageCount && this.thumbnailView) {
Promise.all([this.createRequestForThumbnails()]);
// tslint:disable-next-line
var isIE = !!document.documentMode;
if (!isIE) {
Promise.all([this.createRequestForThumbnails()]);
}
else {
this.createRequestForThumbnails();
}
}

@@ -247,2 +270,5 @@ };

}
else {
this.isThumbnailClicked = false;
}
};

@@ -272,4 +298,6 @@ ThumbnailView.prototype.setSelectionStyle = function (thumbnailElement) {

else {
thumbnailElement.classList.remove('e-pv-thumbnail-selection');
thumbnailElement.classList.add('e-pv-thumbnail-focus');
if (!thumbnailElement.classList.contains('e-pv-thumbnail-selection')) {
thumbnailElement.classList.remove('e-pv-thumbnail-selection');
thumbnailElement.classList.add('e-pv-thumbnail-focus');
}
}

@@ -276,0 +304,0 @@ };

@@ -174,2 +174,7 @@ import { createElement } from '@syncfusion/ej2-base';

var toolbarDiv = this.createToolbar(width);
// tslint:disable-next-line
var isIE = !!document.documentMode;
if (isIE) {
this.totalPageItem.classList.add('e-pv-total-page-ms');
}
this.createFileElement(toolbarDiv);

@@ -310,30 +315,30 @@ this.wireEvent();

Toolbar.prototype.enableOpenOption = function (enableOpenOption) {
this.toolbar.enableItems(this.openDocumentItem, enableOpenOption);
this.toolbar.enableItems(this.openDocumentItem.parentElement, enableOpenOption);
};
Toolbar.prototype.enablePageNavigationTool = function (enablePageNavigationTool) {
this.toolbar.enableItems(this.firstPageItem, enablePageNavigationTool);
this.toolbar.enableItems(this.previousPageItem, enablePageNavigationTool);
this.toolbar.enableItems(this.nextPageItem, enablePageNavigationTool);
this.toolbar.enableItems(this.lastPageItem, enablePageNavigationTool);
this.toolbar.enableItems(this.firstPageItem.parentElement, enablePageNavigationTool);
this.toolbar.enableItems(this.previousPageItem.parentElement, enablePageNavigationTool);
this.toolbar.enableItems(this.nextPageItem.parentElement, enablePageNavigationTool);
this.toolbar.enableItems(this.lastPageItem.parentElement, enablePageNavigationTool);
this.currentPageBox.readonly = !enablePageNavigationTool;
};
Toolbar.prototype.enableMagnificationTool = function (enableMagnificationTool) {
this.toolbar.enableItems(this.zoomInItem, enableMagnificationTool);
this.toolbar.enableItems(this.zoomOutItem, enableMagnificationTool);
this.toolbar.enableItems(this.zoomInItem.parentElement, enableMagnificationTool);
this.toolbar.enableItems(this.zoomOutItem.parentElement, enableMagnificationTool);
this.zoomDropDown.readonly = !enableMagnificationTool;
};
Toolbar.prototype.enableSelectionTool = function (enableSelectionTool) {
this.toolbar.enableItems(this.textSelectItem, enableSelectionTool);
this.toolbar.enableItems(this.textSelectItem.parentElement, enableSelectionTool);
};
Toolbar.prototype.enableScrollingTool = function (enableScrollingTool) {
this.toolbar.enableItems(this.panItem, enableScrollingTool);
this.toolbar.enableItems(this.panItem.parentElement, enableScrollingTool);
};
Toolbar.prototype.enableDownloadOption = function (enableDownloadOption) {
this.toolbar.enableItems(this.downloadItem, enableDownloadOption);
this.toolbar.enableItems(this.downloadItem.parentElement, enableDownloadOption);
};
Toolbar.prototype.enablePrintOption = function (enablePrintOption) {
this.toolbar.enableItems(this.printItem, enablePrintOption);
this.toolbar.enableItems(this.printItem.parentElement, enablePrintOption);
};
Toolbar.prototype.enableSearchOption = function (enableSearchOption) {
this.toolbar.enableItems(this.textSearchItem, enableSearchOption);
this.toolbar.enableItems(this.textSearchItem.parentElement, enableSearchOption);
};

@@ -354,17 +359,21 @@ /**

if (this.pdfViewerBase.pageCount === 0) {
this.toolbar.enableItems(this.downloadItem, false);
this.toolbar.enableItems(this.printItem, false);
this.toolbar.enableItems(this.downloadItem.parentElement, false);
this.toolbar.enableItems(this.printItem.parentElement, false);
this.updateNavigationButtons();
this.toolbar.enableItems(this.zoomInItem, false);
this.toolbar.enableItems(this.zoomOutItem, false);
this.toolbar.enableItems(this.zoomInItem.parentElement, false);
this.toolbar.enableItems(this.zoomOutItem.parentElement, false);
if (this.pdfViewer.magnificationModule) {
this.zoomDropDown.readonly = true;
}
this.toolbar.enableItems(this.textSelectItem, false);
this.toolbar.enableItems(this.panItem, false);
this.toolbar.enableItems(this.textSearchItem, false);
this.toolbar.enableItems(this.pdfViewerBase.getElement('_currentPageInputContainer'), false);
this.toolbar.enableItems(this.pdfViewerBase.getElement('_zoomDropDownContainer'), false);
this.toolbar.enableItems(this.textSelectItem.parentElement, false);
this.toolbar.enableItems(this.panItem.parentElement, false);
this.toolbar.enableItems(this.textSearchItem.parentElement, false);
}
else if (this.pdfViewerBase.pageCount > 0) {
this.toolbar.enableItems(this.downloadItem, true);
this.toolbar.enableItems(this.printItem, true);
this.toolbar.enableItems(this.downloadItem.parentElement, true);
this.toolbar.enableItems(this.printItem.parentElement, true);
this.toolbar.enableItems(this.pdfViewerBase.getElement('_currentPageInputContainer'), true);
this.toolbar.enableItems(this.pdfViewerBase.getElement('_zoomDropDownContainer'), true);
this.updateNavigationButtons();

@@ -377,3 +386,3 @@ this.updateZoomButtons();

if (this.pdfViewer.textSearchModule && this.pdfViewer.enableTextSearch) {
this.toolbar.enableItems(this.textSearchItem, true);
this.toolbar.enableItems(this.textSearchItem.parentElement, true);
}

@@ -388,31 +397,31 @@ }

if (this.pdfViewerBase.pageCount === 0 || (this.pdfViewerBase.currentPageNumber === 1 && this.pdfViewerBase.pageCount === 1)) {
this.toolbar.enableItems(this.firstPageItem, false);
this.toolbar.enableItems(this.previousPageItem, false);
this.toolbar.enableItems(this.nextPageItem, false);
this.toolbar.enableItems(this.lastPageItem, false);
this.toolbar.enableItems(this.firstPageItem.parentElement, false);
this.toolbar.enableItems(this.previousPageItem.parentElement, false);
this.toolbar.enableItems(this.nextPageItem.parentElement, false);
this.toolbar.enableItems(this.lastPageItem.parentElement, false);
}
else if (this.pdfViewerBase.currentPageNumber === 1 && this.pdfViewerBase.pageCount > 0) {
this.toolbar.enableItems(this.firstPageItem, false);
this.toolbar.enableItems(this.previousPageItem, false);
this.toolbar.enableItems(this.nextPageItem, true);
this.toolbar.enableItems(this.lastPageItem, true);
this.toolbar.enableItems(this.firstPageItem.parentElement, false);
this.toolbar.enableItems(this.previousPageItem.parentElement, false);
this.toolbar.enableItems(this.nextPageItem.parentElement, true);
this.toolbar.enableItems(this.lastPageItem.parentElement, true);
}
else if (this.pdfViewerBase.currentPageNumber === this.pdfViewerBase.pageCount && this.pdfViewerBase.pageCount > 0) {
this.toolbar.enableItems(this.firstPageItem, true);
this.toolbar.enableItems(this.previousPageItem, true);
this.toolbar.enableItems(this.nextPageItem, false);
this.toolbar.enableItems(this.lastPageItem, false);
this.toolbar.enableItems(this.firstPageItem.parentElement, true);
this.toolbar.enableItems(this.previousPageItem.parentElement, true);
this.toolbar.enableItems(this.nextPageItem.parentElement, false);
this.toolbar.enableItems(this.lastPageItem.parentElement, false);
}
else if (this.pdfViewerBase.currentPageNumber > 1 && this.pdfViewerBase.currentPageNumber < this.pdfViewerBase.pageCount) {
this.toolbar.enableItems(this.firstPageItem, true);
this.toolbar.enableItems(this.previousPageItem, true);
this.toolbar.enableItems(this.nextPageItem, true);
this.toolbar.enableItems(this.lastPageItem, true);
this.toolbar.enableItems(this.firstPageItem.parentElement, true);
this.toolbar.enableItems(this.previousPageItem.parentElement, true);
this.toolbar.enableItems(this.nextPageItem.parentElement, true);
this.toolbar.enableItems(this.lastPageItem.parentElement, true);
}
}
else {
this.toolbar.enableItems(this.firstPageItem, false);
this.toolbar.enableItems(this.previousPageItem, false);
this.toolbar.enableItems(this.nextPageItem, false);
this.toolbar.enableItems(this.lastPageItem, false);
this.toolbar.enableItems(this.firstPageItem.parentElement, false);
this.toolbar.enableItems(this.previousPageItem.parentElement, false);
this.toolbar.enableItems(this.nextPageItem.parentElement, false);
this.toolbar.enableItems(this.lastPageItem.parentElement, false);
this.currentPageBox.readonly = true;

@@ -427,12 +436,12 @@ }

if (this.pdfViewer.magnificationModule.zoomFactor <= 0.5) {
this.toolbar.enableItems(this.zoomInItem, true);
this.toolbar.enableItems(this.zoomOutItem, false);
this.toolbar.enableItems(this.zoomInItem.parentElement, true);
this.toolbar.enableItems(this.zoomOutItem.parentElement, false);
}
else if (this.pdfViewer.magnificationModule.zoomFactor >= 4) {
this.toolbar.enableItems(this.zoomInItem, false);
this.toolbar.enableItems(this.zoomOutItem, true);
this.toolbar.enableItems(this.zoomInItem.parentElement, false);
this.toolbar.enableItems(this.zoomOutItem.parentElement, true);
}
else {
this.toolbar.enableItems(this.zoomInItem, true);
this.toolbar.enableItems(this.zoomOutItem, true);
this.toolbar.enableItems(this.zoomInItem.parentElement, true);
this.toolbar.enableItems(this.zoomOutItem.parentElement, true);
}

@@ -750,12 +759,12 @@ }

if (this.pdfViewer.enableTextSelection) {
this.toolbar.enableItems(this.textSelectItem, true);
this.toolbar.enableItems(this.textSelectItem.parentElement, true);
}
else {
this.toolbar.enableItems(this.textSelectItem, false);
this.toolbar.enableItems(this.textSelectItem.parentElement, false);
}
}
else {
this.toolbar.enableItems(this.textSelectItem, false);
this.toolbar.enableItems(this.textSelectItem.parentElement, false);
}
this.toolbar.enableItems(this.panItem, true);
this.toolbar.enableItems(this.panItem.parentElement, true);
if (this.pdfViewer.interactionMode === 'TextSelection') {

@@ -762,0 +771,0 @@ this.selectItem(this.textSelectItem);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc