Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-pdfviewer

Package Overview
Dependencies
Maintainers
3
Versions
291
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 17.1.32-beta to 17.1.38

styles/bootstrap4.css

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 17.1.32-beta
* version : 17.1.38
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

@@ -1,1 +0,6 @@

export * from './pdfviewer';
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./pdfviewer"));

@@ -1,3 +0,5 @@

import { TestHelper } from '@syncfusion/ej2-base/helpers/e2e';
export class PdfViewer extends TestHelper {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const e2e_1 = require("@syncfusion/ej2-base/helpers/e2e");
class PdfViewer extends e2e_1.TestHelper {
constructor(id, wrapperFn) {

@@ -18,1 +20,2 @@ super();

}
exports.PdfViewer = PdfViewer;
{
"name": "@syncfusion/ej2-pdfviewer",
"version": "17.1.32-beta",
"version": "17.1.38",
"description": "Essential JS 2 PDF viewer Component",

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

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

@@ -22,0 +22,0 @@ "devDependencies": {},

@@ -18,2 +18,5 @@ import { PdfViewer, PdfViewerBase, AnnotationType, TextMarkupAnnotation } from '../index';

private pdfViewerBase;
/**
* @private
*/
textMarkupAnnotationModule: TextMarkupAnnotation;

@@ -20,0 +23,0 @@ private popupNote;

@@ -55,2 +55,6 @@ import { TextMarkupAnnotation } from '../index';

this.textMarkupAnnotationModule.deleteTextMarkupAnnotation();
if (this.pdfViewer.toolbarModule.annotationToolbarModule) {
this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(false);
this.pdfViewer.toolbarModule.annotationToolbarModule.enableAnnotationPropertiesTools(false);
}
}

@@ -57,0 +61,0 @@ };

@@ -632,3 +632,3 @@ import { createElement, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';

var pageNumber = this.pdfViewer.annotationModule.getEventPageNumber(event);
if (!isNullOrUndefined(pageNumber)) {
if (!isNullOrUndefined(pageNumber) && !isNaN(pageNumber)) {
var canvas = this.pdfViewerBase.getElement('_annotationCanvas_' + pageNumber);

@@ -651,2 +651,8 @@ var currentAnnot = this.getCurrentMarkupAnnotation(event.clientX, event.clientY, pageNumber, canvas);

}
else {
if (!this.pdfViewerBase.isClickedOnScrollBar(event)) {
this.clearCurrentAnnotation();
this.clearCurrentAnnotationSelection(pageNumber);
}
}
};

@@ -658,3 +664,3 @@ /**

var pageNumber = this.pdfViewer.annotationModule.getEventPageNumber(event);
if (!isNullOrUndefined(pageNumber)) {
if (!isNullOrUndefined(pageNumber) && !isNaN(pageNumber)) {
this.clearCurrentAnnotationSelection(pageNumber);

@@ -680,2 +686,6 @@ var touchCanvas = this.pdfViewerBase.getElement('_annotationCanvas_' + pageNumber);

}
else {
this.clearCurrentAnnotation();
this.clearCurrentAnnotationSelection(pageNumber);
}
};

@@ -694,3 +704,3 @@ /**

eventTarget.style.cursor = 'pointer';
this.showPopupNote(event, currentAnnot);
// this.showPopupNote(event, currentAnnot);
}

@@ -823,3 +833,3 @@ else {

// tslint:disable-next-line:max-line-length
if (this.pdfViewer.toolbarModule.annotationToolbarModule) {
if (this.pdfViewer.toolbarModule && this.pdfViewer.toolbarModule.annotationToolbarModule) {
this.pdfViewer.toolbarModule.annotationToolbarModule.createMobileAnnotationToolbar(isEnable);

@@ -826,0 +836,0 @@ }

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

this.copyContextMenu = [{ text: this.pdfViewer.localeObj.getConstant('Copy'), iconCss: 'e-pv-copy-icon' },
{ text: this.pdfViewer.localeObj.getConstant('highlight'), iconCss: 'e-pv-highlight-icon' },
{ text: this.pdfViewer.localeObj.getConstant('underline'), iconCss: 'e-pv-underline-icon' },
{ text: this.pdfViewer.localeObj.getConstant('strikethrough'), iconCss: 'e-pv-strikethrough-icon' }];
{ text: this.pdfViewer.localeObj.getConstant('Highlight context'), iconCss: 'e-pv-highlight-icon' },
{ text: this.pdfViewer.localeObj.getConstant('Underline context'), iconCss: 'e-pv-underline-icon' },
{ text: this.pdfViewer.localeObj.getConstant('Strikethrough context'), iconCss: 'e-pv-strikethrough-icon' }];
}

@@ -26,5 +26,2 @@ /**

this.contextMenuElement = createElement('ul', { id: this.pdfViewer.element.id + '_context_menu' });
if (this.pdfViewer.enableRtl) {
this.contextMenuElement.style.direction = 'rtl';
}
this.pdfViewer.element.appendChild(this.contextMenuElement);

@@ -36,2 +33,5 @@ this.contextMenuObj = new Context({

});
if (this.pdfViewer.enableRtl) {
this.contextMenuObj.enableRtl = true;
}
this.contextMenuObj.appendTo(this.contextMenuElement);

@@ -46,4 +46,5 @@ if (Browser.isDevice) {

ContextMenu.prototype.contextMenuOnCreated = function (args) {
var items = [this.pdfViewer.localeObj.getConstant('highlight'), this.pdfViewer.localeObj.getConstant('underline'),
this.pdfViewer.localeObj.getConstant('strikethrough')];
// tslint:disable-next-line:max-line-length
var items = [this.pdfViewer.localeObj.getConstant('Highlight context'), this.pdfViewer.localeObj.getConstant('Underline context'),
this.pdfViewer.localeObj.getConstant('Strikethrough context')];
if (this.pdfViewer.annotationModule) {

@@ -127,3 +128,3 @@ if (!this.pdfViewer.annotationModule.textMarkupAnnotationModule) {

break;
case this.pdfViewer.localeObj.getConstant('highlight'):
case this.pdfViewer.localeObj.getConstant('Highlight context'):
if (this.pdfViewer.annotation.textMarkupAnnotationModule) {

@@ -134,3 +135,3 @@ this.pdfViewer.annotation.textMarkupAnnotationModule.drawTextMarkupAnnotations('Highlight');

break;
case this.pdfViewer.localeObj.getConstant('underline'):
case this.pdfViewer.localeObj.getConstant('Underline context'):
if (this.pdfViewer.annotation.textMarkupAnnotationModule) {

@@ -141,3 +142,3 @@ this.pdfViewer.annotation.textMarkupAnnotationModule.drawTextMarkupAnnotations('Underline');

break;
case this.pdfViewer.localeObj.getConstant('strikethrough'):
case this.pdfViewer.localeObj.getConstant('Strikethrough context'):
if (this.pdfViewer.annotation.textMarkupAnnotationModule) {

@@ -144,0 +145,0 @@ this.pdfViewer.annotation.textMarkupAnnotationModule.drawTextMarkupAnnotations('Strikethrough');

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

private closeDiv;
private resizeIcon;
private isDown;

@@ -24,4 +25,2 @@ private offset;

private closeButtonLeft;
private isBookmarkOpen;
private isThumbnailOpen;
private previousX;

@@ -57,2 +56,14 @@ private toolbarElement;

sideBarContentContainer: HTMLElement;
/**
* @private
*/
sideBarToolbarSplitter: HTMLElement;
/**
* @private
*/
isBookmarkOpen: boolean;
/**
* @private
*/
isThumbnailOpen: boolean;
constructor(viewer: PdfViewer, base: PdfViewerBase);

@@ -103,2 +114,6 @@ /**

private createResizeIcon;
/**
* @private
*/
setResizeIconTop(): void;
private resizeIconMouseOver;

@@ -105,0 +120,0 @@ private resizePanelMouseDown;

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

this.closeButtonLeft = 170;
this.isBookmarkOpen = false;
this.isThumbnailOpen = false;
this.isTooltipCreated = false;

@@ -31,2 +29,10 @@ /**

this.isNavigationPaneResized = false;
/**
* @private
*/
this.isBookmarkOpen = false;
/**
* @private
*/
this.isThumbnailOpen = false;
this.resizeIconMouseOver = function (event) {

@@ -123,3 +129,2 @@ event.srcElement.style.cursor = 'default';

_this.sideBarContent.setAttribute('aria-label', 'Thumbnail View Panel');
_this.sideBarContent.focus();
var proxy = _this;

@@ -146,2 +151,3 @@ var bookmarkPane = document.getElementById(_this.pdfViewer.element.id + '_bookmark_view');

else {
_this.sideBarContent.focus();
proxy.isThumbnailOpen = true;

@@ -160,3 +166,2 @@ proxy.setThumbnailSelectionIconTheme();

_this.sideBarContent.setAttribute('aria-label', 'Bookmark View Panel');
_this.sideBarContent.focus();
_this.pdfViewer.bookmarkViewModule.renderBookmarkcontent();

@@ -177,2 +182,3 @@ if (_this.sideBarContentContainer) {

else {
_this.sideBarContent.focus();
_this.setBookmarkSelectionIconTheme();

@@ -206,9 +212,9 @@ _this.isBookmarkOpen = true;

// tslint:disable-next-line:max-line-length
var sideBarToolbarSplitter = createElement('div', { id: this.pdfViewer.element.id + '_sideBarToolbarSplitter', className: 'e-pv-sidebar-toolbar-splitter' });
this.pdfViewerBase.mainContainer.appendChild(sideBarToolbarSplitter);
this.sideBarToolbarSplitter = createElement('div', { id: this.pdfViewer.element.id + '_sideBarToolbarSplitter', className: 'e-pv-sidebar-toolbar-splitter' });
this.pdfViewerBase.mainContainer.appendChild(this.sideBarToolbarSplitter);
if (this.pdfViewer.enableRtl) {
sideBarToolbarSplitter.classList.add('e-right');
this.sideBarToolbarSplitter.classList.add('e-right');
}
else {
sideBarToolbarSplitter.classList.add('e-left');
this.sideBarToolbarSplitter.classList.add('e-left');
}

@@ -284,2 +290,6 @@ // tslint:disable-next-line:max-line-length

var toolbarHeight = toolbarContainer.getBoundingClientRect().height;
if (toolbarHeight === 0) {
// tslint:disable-next-line
toolbarHeight = parseFloat(window.getComputedStyle(toolbarContainer)['height']) + 1;
}
// tslint:disable-next-line:max-line-length

@@ -555,9 +565,18 @@ this.sideBarToolbar.style.top = toolbarHeight + 'px';

// tslint:disable-next-line:max-line-length
var resizeIcon = createElement('div', { id: this.pdfViewer.element.id + '_resize', className: 'e-pv-resize-icon e-pv-icon' });
resizeIcon.style.top = (this.sideBarToolbar.clientHeight) / 2 + 'px';
resizeIcon.style.position = 'absolute';
resizeIcon.addEventListener('click', this.sideToolbarOnClose);
resizeIcon.addEventListener('mouseover', this.resizeIconMouseOver);
this.sideBarResizer.appendChild(resizeIcon);
this.resizeIcon = createElement('div', { id: this.pdfViewer.element.id + '_resize', className: 'e-pv-resize-icon e-pv-icon' });
this.setResizeIconTop();
this.resizeIcon.style.position = 'absolute';
this.resizeIcon.addEventListener('click', this.sideToolbarOnClose);
this.resizeIcon.addEventListener('mouseover', this.resizeIconMouseOver);
this.sideBarResizer.appendChild(this.resizeIcon);
};
/**
* @private
*/
NavigationPane.prototype.setResizeIconTop = function () {
// tslint:disable-next-line:max-line-length
if (this.sideBarToolbar && this.sideBarToolbar.clientHeight && this.resizeIcon.style.top === '') {
this.resizeIcon.style.top = (this.sideBarToolbar.clientHeight) / 2 + 'px';
}
};
Object.defineProperty(NavigationPane.prototype, "outerContainerWidth", {

@@ -564,0 +583,0 @@ /**

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

private createGUID;
private isClickedOnScrollBar;
/**
* @private
*/
isClickedOnScrollBar(event: MouseEvent): boolean;
private setScrollDownValue;

@@ -375,0 +378,0 @@ /**

@@ -692,2 +692,3 @@ import { Browser } from '@syncfusion/ej2-base';

if (this.fitType === 'fitToPage') {
this.isMagnified = false;
event.preventDefault();

@@ -694,0 +695,0 @@ if (event.wheelDelta > 0) {

@@ -205,2 +205,8 @@ import { Component, INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, L10n } from '@syncfusion/ej2-base';import { ModuleDeclaration, isNullOrUndefined, Property, Event, EmitType } from '@syncfusion/ej2-base';import { PdfViewerBase } from './index';import { Navigation } from './index';import { Magnification } from './index';import { Toolbar } from './index';import { ToolbarItem } from './index';import { LinkTarget, InteractionMode, AnnotationType, AnnotationToolbarItem } from './base/types';import { Annotation } from './index';import { LinkAnnotation } from './index';import { ThumbnailView } from './index';import { BookmarkView } from './index';import { TextSelection } from './index';import { TextSearch } from './index';import { Print } from './index';import { IUnloadEventArgs, ILoadEventArgs, ILoadFailedEventArgs, IAjaxRequestFailureEventArgs, IPageChangeEventArgs, IPageClickEventArgs, IZoomChangeEventArgs, IHyperlinkClickEventArgs } from './index';import { IAnnotationAddEventArgs, IAnnotationRemoveEventArgs, IAnnotationPropertiesChangeEventArgs } from './index';

/**
* Enable or disables the Navigation toolbar of PdfViewer.
* @default true
*/
enableNavigationToolbar?: boolean;
/**
* Enable or disables the download option of PdfViewer.

@@ -207,0 +213,0 @@ * @default true

@@ -205,2 +205,7 @@ import { Component, INotifyPropertyChanged, ChildProperty, L10n } from '@syncfusion/ej2-base';

/**
* Enable or disables the Navigation toolbar of PdfViewer.
* @default true
*/
enableNavigationToolbar: boolean;
/**
* Enable or disables the download option of PdfViewer.

@@ -207,0 +212,0 @@ * @default true

@@ -230,5 +230,5 @@ var __extends = (this && this.__extends) || (function () {

'Opacity edit': 'Change Opacity',
'highlight': 'Highlight',
'underline': 'Underline',
'strikethrough': 'Strike through',
'Highlight context': 'Highlight',
'Underline context': 'Underline',
'Strikethrough context': 'Strike through',
// tslint:disable-next-line:max-line-length

@@ -246,3 +246,3 @@ '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.',

'Print text': 'Print',
'Seach text': 'Search',
'Search text': 'Search',
'Annotation Edit text': 'Edit Annotation'

@@ -637,2 +637,5 @@ };

Property(true)
], PdfViewer.prototype, "enableNavigationToolbar", void 0);
__decorate([
Property(true)
], PdfViewer.prototype, "enableDownload", void 0);

@@ -685,3 +688,3 @@ __decorate([

__decorate([
Property({ opacity: 1, color: '#ffff00', author: 'Guest', subject: 'Highlight', modifiedDate: '' })
Property({ opacity: 1, color: '#FFDF56', author: 'Guest', subject: 'Highlight', modifiedDate: '' })
], PdfViewer.prototype, "highlightSettings", void 0);

@@ -688,0 +691,0 @@ __decorate([

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

var iconSpan = createElement('span', { id: this.pdfViewer.element.id + '_' + id + 'Icon', className: 'e-pv-icon-search ' + className + '-icon' });
if (this.pdfViewer.enableRtl) {
if (className === 'e-pv-prev-search') {
iconSpan.style.paddingRight = '5px';
}
}
button.disabled = true;

@@ -890,0 +885,0 @@ button.appendChild(iconSpan);

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

private opacitySlider;
private toolbarBorderHeight;
/**

@@ -85,2 +86,3 @@ * @private

showAnnotationToolbar(element: HTMLElement): void;
private enablePropertiesTool;
private applyAnnotationToolbarSettings;

@@ -96,2 +98,5 @@ private showSeparator;

private adjustViewer;
private updateContentContainerHeight;
private getToolbarHeight;
private getHeight;
private handleHighlight;

@@ -98,0 +103,0 @@ private handleUnderline;

@@ -10,2 +10,3 @@ import { createElement, Browser } from '@syncfusion/ej2-base';

function AnnotationToolbar(viewer, viewerBase, toolbar) {
this.toolbarBorderHeight = 1;
/**

@@ -194,2 +195,3 @@ * @private

}
this.colorPalette.refresh();
this.updateColorInIcon(this.colorDropDownElement, this.colorPalette.value);

@@ -204,9 +206,12 @@ };

case 'Highlight':
this.colorPalette.value = this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightColor;
// tslint:disable-next-line:max-line-length
this.colorPalette.setProperties({ 'value': this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightColor }, true);
break;
case 'Underline':
this.colorPalette.value = this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineColor;
// tslint:disable-next-line:max-line-length
this.colorPalette.setProperties({ 'value': this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineColor }, true);
break;
case 'Strikethrough':
this.colorPalette.value = this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughColor;
// tslint:disable-next-line:max-line-length
this.colorPalette.setProperties({ 'value': this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughColor }, true);
break;

@@ -218,2 +223,6 @@ }

AnnotationToolbar.prototype.colorDropDownOpen = function () {
if (Browser.isDevice) {
// tslint:disable-next-line:max-line-length
this.pdfViewerBase.getElement('_annotation_color-popup').style.left = '0px';
}
this.colorPalette.refresh();

@@ -285,3 +294,3 @@ };

inline: true, mode: 'Palette', cssClass: 'e-show-value', enableOpacity: false,
change: this.onColorPickerChange.bind(this), value: '#000000'
change: this.onColorPickerChange.bind(this), value: '#000000', showButtons: false,
});

@@ -380,3 +389,2 @@ if (this.pdfViewer.enableRtl) {

this.pdfViewer.annotationModule.deleteAnnotation();
this.selectAnnotationDeleteItem(false);
break;

@@ -394,2 +402,4 @@ case this.pdfViewer.element.id + '_annotation_close':

if (!this.isToolbarHidden) {
// tslint:disable-next-line
var annotationModule = this.pdfViewer.annotationModule;
if (element) {

@@ -399,4 +409,11 @@ this.adjustViewer(false);

}
this.deselectAllItems();
// tslint:disable-next-line:max-line-length
if (annotationModule && annotationModule.textMarkupAnnotationModule && annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation) {
this.enablePropertiesTool(annotationModule);
}
else {
this.deselectAllItems();
}
this.toolbarElement.style.display = 'none';
this.primaryToolbar.updateInteractionTools(true);
}

@@ -409,2 +426,3 @@ else {

if (toolBarInitialStatus === 'none') {
this.primaryToolbar.DisableInteractionTools();
this.adjustViewer(true);

@@ -414,2 +432,6 @@ }

}
// tslint:disable-next-line:max-line-length
if (this.pdfViewer.magnification && this.pdfViewer.magnification.fitType === 'fitToPage') {
this.pdfViewer.magnification.fitToPage();
}
if (this.pdfViewerBase.isPanMode) {

@@ -423,2 +445,18 @@ this.enableAnnotationAddTools(false);

};
// tslint:disable-next-line
AnnotationToolbar.prototype.enablePropertiesTool = function (annotationModule) {
this.isHighlightEnabled = false;
this.isUnderlineEnabled = false;
this.isStrikethroughEnabled = false;
if (this.pdfViewerBase.isTextMarkupAnnotationModule()) {
annotationModule.textMarkupAnnotationModule.isTextMarkupAnnotationMode = false;
}
this.primaryToolbar.deSelectItem(this.highlightItem);
this.primaryToolbar.deSelectItem(this.underlineItem);
this.primaryToolbar.deSelectItem(this.strikethroughItem);
this.enableAnnotationPropertiesTools(true);
// tslint:disable-next-line:max-line-length
this.updateColorInIcon(this.colorDropDownElement, annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation.color);
this.selectAnnotationDeleteItem(true);
};
AnnotationToolbar.prototype.applyAnnotationToolbarSettings = function () {

@@ -506,4 +544,4 @@ if (this.pdfViewer.annotationToolbarSettings.annotationToolbarItem.indexOf('HighlightTool') !== -1) {

var toolbarContainer = this.pdfViewerBase.getElement('_toolbarContainer');
var toolbarHeight = toolbarContainer.getBoundingClientRect().height;
var annotationToolbarHeight = this.toolbarElement.getBoundingClientRect().height;
var toolbarHeight = this.getToolbarHeight(toolbarContainer);
var annotationToolbarHeight = this.getToolbarHeight(this.toolbarElement);
var sideBarToolbar = this.pdfViewerBase.navigationPane.sideBarToolbar;

@@ -528,6 +566,34 @@ var sideBarContentContainer = this.pdfViewerBase.navigationPane.sideBarContentContainer;

this.pdfViewerBase.viewerContainer.style.height = this.resetViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer), annotationToolbarHeight) + 'px';
sideBarToolbar.style.height = sideBarToolbar.getBoundingClientRect().height + annotationToolbarHeight + 'px';
splitterElement.style.height = splitterElement.getBoundingClientRect().height + annotationToolbarHeight + 'px';
sideBarToolbar.style.height = this.getHeight(sideBarToolbar, annotationToolbarHeight);
splitterElement.style.height = this.getHeight(splitterElement, annotationToolbarHeight);
}
this.updateContentContainerHeight(isAdjust);
};
AnnotationToolbar.prototype.updateContentContainerHeight = function (isAdjust) {
var annotationToolbarHeight = this.getToolbarHeight(this.toolbarElement);
var sideBarClientRect = this.pdfViewerBase.navigationPane.sideBarContentContainer.getBoundingClientRect();
if (sideBarClientRect.height !== 0) {
if (isAdjust) {
// tslint:disable-next-line:max-line-length
this.pdfViewerBase.navigationPane.sideBarContentContainer.style.height = sideBarClientRect.height - annotationToolbarHeight + 'px';
}
else {
// tslint:disable-next-line:max-line-length
this.pdfViewerBase.navigationPane.sideBarContentContainer.style.height = sideBarClientRect.height + annotationToolbarHeight + 'px';
}
}
};
AnnotationToolbar.prototype.getToolbarHeight = function (element) {
var toolbarHeight = element.getBoundingClientRect().height;
if (toolbarHeight === 0 && element === this.pdfViewerBase.getElement('_toolbarContainer')) {
// getComputedStyle gets the value from style and toolbar border height is added to it.
// tslint:disable-next-line
toolbarHeight = parseFloat(window.getComputedStyle(element)['height']) + this.toolbarBorderHeight;
}
return toolbarHeight;
};
AnnotationToolbar.prototype.getHeight = function (element, toolbarHeight) {
var height = element.getBoundingClientRect().height;
return (height !== 0) ? height + toolbarHeight + 'px' : '';
};
AnnotationToolbar.prototype.handleHighlight = function () {

@@ -534,0 +600,0 @@ if (!this.isHighlightEnabled) {

@@ -80,2 +80,8 @@ import { PdfViewer, PdfViewerBase, AnnotationToolbar } from '../index';

/**
* Shows/hides the Navigation toolbar in the PdfViewer
* @param {boolean} enableNavigationToolbar - If set true , its show the Navigation Toolbar
* @returns void
*/
showNavigationToolbar(enableNavigationToolbar: boolean): void;
/**
* Shows /hides the the toolbar items in the PdfViewer

@@ -205,2 +211,6 @@ * @param {string[]} items - Defines the toolbar items in the toolbar

*/
DisableInteractionTools(): void;
/**
* @private
*/
selectItem(element: HTMLElement): void;

@@ -211,3 +221,6 @@ /**

deSelectItem(element: HTMLElement): void;
private updateInteractionTools;
/**
* @private
*/
updateInteractionTools(isTextSelect: boolean): void;
private initialEnableItems;

@@ -214,0 +227,0 @@ private showSeparator;

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 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

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