@vaadin-component-factory/vcf-pdf-viewer 1.1.1 → 1.2.0

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.
@@ -303,7 +303,7 @@ class PdfViewerElement extends
303
303
  }
304
304
 
305
305
  static get version() {
306
- return '1.1.1';
306
+ return '1.2.0';
307
307
  }
308
308
 
309
309
  static get properties() {
@@ -417,6 +417,14 @@ class PdfViewerElement extends
417
417
  type: String,
418
418
  value: "Page fit"
419
419
  },
420
+
421
+ /**
422
+ * Property to define a custom title for the viewer
423
+ */
424
+ customTitle: {
425
+ type: String,
426
+ value: ""
427
+ },
420
428
  };
421
429
  }
422
430
 
@@ -427,7 +435,9 @@ class PdfViewerElement extends
427
435
  }
428
436
 
429
437
  __setTitle(pdfTitle, filename) {
430
- if(this.__viewer && this.toolbarOnlyFilename && filename) {
438
+ if(this.customTitle){
439
+ this.__title = this.customTitle;
440
+ } else if(this.__viewer && this.toolbarOnlyFilename && filename) {
431
441
  this.__title = filename;
432
442
  } else if (pdfTitle && filename) {
433
443
  this.__title = pdfTitle + ' - ' + filename;