@vaadin-component-factory/vcf-pdf-viewer 1.0.2 → 1.0.3
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.
- package/package.json +1 -1
- package/src/vcf-pdf-viewer.js +12 -2
package/package.json
CHANGED
package/src/vcf-pdf-viewer.js
CHANGED
|
@@ -379,6 +379,14 @@ class PdfViewerElement extends
|
|
|
379
379
|
type: Boolean,
|
|
380
380
|
value: false
|
|
381
381
|
},
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Flag to indicate if toolbar should only show filename as title
|
|
385
|
+
*/
|
|
386
|
+
toolbarOnlyFilename: {
|
|
387
|
+
type: Boolean,
|
|
388
|
+
value: false
|
|
389
|
+
},
|
|
382
390
|
};
|
|
383
391
|
}
|
|
384
392
|
|
|
@@ -389,7 +397,9 @@ class PdfViewerElement extends
|
|
|
389
397
|
}
|
|
390
398
|
|
|
391
399
|
__setTitle(pdfTitle, filename) {
|
|
392
|
-
if
|
|
400
|
+
if(this.__viewer && this.toolbarOnlyFilename && filename) {
|
|
401
|
+
this.__title = filename;
|
|
402
|
+
} else if (pdfTitle && filename) {
|
|
393
403
|
this.__title = pdfTitle + ' - ' + filename;
|
|
394
404
|
} else if (pdfTitle) {
|
|
395
405
|
this.__title = pdfTitle;
|
|
@@ -398,7 +408,7 @@ class PdfViewerElement extends
|
|
|
398
408
|
} else {
|
|
399
409
|
this.__title = 'PDF';
|
|
400
410
|
}
|
|
401
|
-
|
|
411
|
+
}
|
|
402
412
|
|
|
403
413
|
ready() {
|
|
404
414
|
super.ready();
|