Skip to content
Snippets Groups Projects
Unverified Commit 09577c3f authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Add pdf preview responsiveness and fix width adaption (#5)

parent c222b342
No related branches found
No related tags found
No related merge requests found
Pipeline #10845 passed
......@@ -80,6 +80,10 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
}
});
// redraw page if window was resized
window.onresize = async () => {
await that.showPage(that.currentPage);
};
});
}
......@@ -110,6 +114,10 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
// show the first page
await this.showPage(1);
// fix width adaption
await this.showPage(1);
this.isPageLoaded = true;
};
......@@ -185,6 +193,13 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
justify-content: center;
}
/* it's too risky to adapt the height */
/*
#pdf-meta button, #pdf-meta input {
max-height: 15px;
}
*/
canvas {
border: solid 1px black;
}
......
......@@ -545,7 +545,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
<vpu-button id="zip-download-button" value="${i18n.t('qualified-pdf-upload.download-zip-button')}" title="${i18n.t('qualified-pdf-upload.download-zip-button-tooltip')}" @click="${this.zipDownloadClickHandler}" type="is-primary"></vpu-button>
</div>
</div>
<div>
<div class="field">
<vpu-pdf-preview></vpu-pdf-preview>
</div>
<div class="files-block error-files field ${classMap({hidden: this.errorFilesCount === 0})}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment