document-viewer-ts
Advanced tools
Comparing version 0.5.1-legacy to 0.5.2-legacy
@@ -48,4 +48,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
export const renderPDF = (containerDiv, documentUrl) => __awaiter(void 0, void 0, void 0, function* () { | ||
const wrapperDiv = document.createElement('div'); | ||
wrapperDiv.className = 'wrapper'; | ||
containerDiv.appendChild(wrapperDiv); | ||
const loadingIndicator = createLoadingIndicator(); | ||
containerDiv.appendChild(loadingIndicator); | ||
wrapperDiv.appendChild(loadingIndicator); | ||
const documentId = containerDiv.id; | ||
@@ -85,3 +88,3 @@ const canvasContainer = document.createElement('div'); | ||
const pdfDocument = yield loadingTask.promise; | ||
containerDiv.removeChild(loadingIndicator); | ||
wrapperDiv.removeChild(loadingIndicator); | ||
const isValidPage = (page) => page <= pdfDocument.numPages && page > 0; | ||
@@ -113,3 +116,3 @@ // initial viewer setup | ||
prevButton.innerHTML = chevronLeft; | ||
containerDiv.appendChild(controlsDiv); | ||
wrapperDiv.appendChild(controlsDiv); | ||
controlsDiv.appendChild(prevButton); | ||
@@ -119,3 +122,3 @@ controlsDiv.appendChild(fullPageNumberDiv); | ||
controlsDiv.appendChild(zoomSelect); | ||
containerDiv.appendChild(canvasContainer); | ||
wrapperDiv.appendChild(canvasContainer); | ||
const displayPage = (page, scale) => __awaiter(void 0, void 0, void 0, function* () { | ||
@@ -122,0 +125,0 @@ pageNumberInput.value = `${page}`; |
@@ -51,4 +51,7 @@ "use strict"; | ||
const renderPDF = (containerDiv, documentUrl) => __awaiter(void 0, void 0, void 0, function* () { | ||
const wrapperDiv = document.createElement('div'); | ||
wrapperDiv.className = 'wrapper'; | ||
containerDiv.appendChild(wrapperDiv); | ||
const loadingIndicator = createLoadingIndicator(); | ||
containerDiv.appendChild(loadingIndicator); | ||
wrapperDiv.appendChild(loadingIndicator); | ||
const documentId = containerDiv.id; | ||
@@ -88,3 +91,3 @@ const canvasContainer = document.createElement('div'); | ||
const pdfDocument = yield loadingTask.promise; | ||
containerDiv.removeChild(loadingIndicator); | ||
wrapperDiv.removeChild(loadingIndicator); | ||
const isValidPage = (page) => page <= pdfDocument.numPages && page > 0; | ||
@@ -116,3 +119,3 @@ // initial viewer setup | ||
prevButton.innerHTML = chevronLeft; | ||
containerDiv.appendChild(controlsDiv); | ||
wrapperDiv.appendChild(controlsDiv); | ||
controlsDiv.appendChild(prevButton); | ||
@@ -122,3 +125,3 @@ controlsDiv.appendChild(fullPageNumberDiv); | ||
controlsDiv.appendChild(zoomSelect); | ||
containerDiv.appendChild(canvasContainer); | ||
wrapperDiv.appendChild(canvasContainer); | ||
const displayPage = (page, scale) => __awaiter(void 0, void 0, void 0, function* () { | ||
@@ -125,0 +128,0 @@ pageNumberInput.value = `${page}`; |
{ | ||
"name": "document-viewer-ts", | ||
"version": "0.5.1-legacy", | ||
"version": "0.5.2-legacy", | ||
"description": "PDF and MS Doc viewer written in TypeScript for React and vanilla JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/lib/index.js", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59544
769