2020-01-28 12:51:21 +01:00
|
|
|
function PDFViewer(viewer, file) {
|
|
|
|
this.viewer = viewer;
|
|
|
|
this.file = file;
|
2020-01-21 15:33:09 +01:00
|
|
|
|
2020-01-28 12:51:21 +01:00
|
|
|
this.container = document.createElement("iframe");
|
|
|
|
this.container.classList = "image-container";
|
|
|
|
this.container.style.border = "none";
|
|
|
|
this.container.src = "/res/misc/pdf-viewer/web/viewer.html?file="+apiEndpoint+"/file/"+file.id;
|
2020-01-27 16:56:16 +01:00
|
|
|
}
|
2020-01-21 15:33:09 +01:00
|
|
|
|
2020-01-28 12:51:21 +01:00
|
|
|
PDFViewer.prototype.render = function(parent) {
|
|
|
|
parent.appendChild(this.container);
|
2020-01-21 15:33:09 +01:00
|
|
|
}
|