Skip to content

Commit 0d728ff

Browse files
committed
Loading spinner issue + Bundle size reduction
1 parent 0bead2b commit 0d728ff

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

docs-website/docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npm list ng2-pdfjs-viewer
2121
You should see output similar to:
2222
```
2323
your-app@1.0.0 /path/to/your-app
24-
└── ng2-pdfjs-viewer@25.0.10
24+
└── ng2-pdfjs-viewer@25.0.11
2525
```
2626

2727
## Production Deployment

docs-website/src/pages/showcase/submit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ ${data.additionalNotes || 'None'}
397397
className={`${styles.input} ${styles.versionInput}`}
398398
value={formData.versionUsed}
399399
onChange={(e) => handleInputChange('versionUsed', e.target.value)}
400-
placeholder="e.g., 25.0.10"
400+
placeholder="e.g., 25.0.11"
401401
/>
402402
</div>
403403
</div>

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng2-pdfjs-viewer",
3-
"version": "25.0.10",
3+
"version": "25.0.11",
44
"description": "The most comprehensive Angular PDF viewer powered by Mozilla PDF.js. 7M+ downloads, mobile-first, production-ready with complete rewrite in v25.x",
55
"author": {
66
"name": "Aneesh Goapalakrishnan",

lib/src/ng2-pdfjs-viewer.component.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,11 @@ export class PdfJsViewerComponent
755755
if (changes['pdfSrc'] && !changes['pdfSrc'].firstChange) {
756756
// pdfSrc changed after initialization - reload the PDF
757757
if (!this.externalWindow) {
758+
// Show spinner immediately when PDF source changes (Issue #275)
759+
this.isLoading = true;
760+
this.hasError = false;
761+
this.currentErrorMessage = "";
762+
758763
// Reset configuration queuing since iframe will reload fresh
759764
this.initialConfigQueued = false;
760765
this.isPostMessageReady = false;
@@ -1771,6 +1776,11 @@ export class PdfJsViewerComponent
17711776
private loadPdf(): void {
17721777
if (!this.validatePdfSource()) return;
17731778

1779+
// Show spinner immediately when PDF loading starts (Issue #275)
1780+
this.isLoading = true;
1781+
this.hasError = false;
1782+
this.currentErrorMessage = "";
1783+
17741784
this.setupExternalWindow();
17751785
const fileUrl = this.createFileUrl();
17761786
const viewerUrl = this.buildViewerUrl(fileUrl);

0 commit comments

Comments
 (0)