aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/components')
-rw-r--r--viewer/src/components/LdPdfViewer.vue10
-rw-r--r--viewer/src/components/LdPlainTextViewer.vue11
2 files changed, 5 insertions, 16 deletions
diff --git a/viewer/src/components/LdPdfViewer.vue b/viewer/src/components/LdPdfViewer.vue
index 78ff3d2..20055cc 100644
--- a/viewer/src/components/LdPdfViewer.vue
+++ b/viewer/src/components/LdPdfViewer.vue
@@ -20,9 +20,9 @@
20 20
21<template> 21<template>
22 <!-- intermediate container necessary to eliminate the double scrollbar --> 22 <!-- intermediate container necessary to eliminate the double scrollbar -->
23 <div :class="$style.container"> 23 <div class="fill no-scroll">
24 <!-- prefer native browser PDF viewer if available --> 24 <!-- prefer native browser PDF viewer if available -->
25 <object :class="$style.content" :data="itemResourceUrl()" type="application/pdf"> 25 <object class="fill" :data="itemResourceUrl()" type="application/pdf">
26 <!-- TODO: fallback to PDF.js (https://github.com/pacien/ldgallery/issues/212) --> 26 <!-- TODO: fallback to PDF.js (https://github.com/pacien/ldgallery/issues/212) -->
27 <ld-download :item="pdfItem" /> 27 <ld-download :item="pdfItem" />
28 </object> 28 </object>
@@ -42,9 +42,5 @@ import { Component, Prop, Vue } from "vue-property-decorator";
42</script> 42</script>
43 43
44<style lang="scss" module> 44<style lang="scss" module>
45.container, .content { 45
46 width: 100%;
47 height: 100%;
48 overflow: hidden;
49}
50</style> 46</style>
diff --git a/viewer/src/components/LdPlainTextViewer.vue b/viewer/src/components/LdPlainTextViewer.vue
index 1dbd351..101fd4c 100644
--- a/viewer/src/components/LdPlainTextViewer.vue
+++ b/viewer/src/components/LdPlainTextViewer.vue
@@ -20,9 +20,9 @@
20 20
21<template> 21<template>
22 <!-- Outer div necessary for the resize handle to appear on Firefox. --> 22 <!-- Outer div necessary for the resize handle to appear on Firefox. -->
23 <div :class="$style.content"> 23 <div :class="$style.content" class="fill">
24 <!-- Using an iframe here to let the browser deal with content encoding detection. --> 24 <!-- Using an iframe here to let the browser deal with content encoding detection. -->
25 <iframe :src="itemResourceUrl()" /> 25 <iframe class="fill" :src="itemResourceUrl()" />
26 </div> 26 </div>
27</template> 27</template>
28 28
@@ -41,8 +41,6 @@ import { Component, Prop, Vue } from "vue-property-decorator";
41<style lang="scss" module> 41<style lang="scss" module>
42.content { 42.content {
43 margin: auto; // Old-school horizontal centering. 43 margin: auto; // Old-school horizontal centering.
44 width: 100%;
45 height: 100%;
46 44
47 // Allow the user to adjust the width of the text view for easier column reading. 45 // Allow the user to adjust the width of the text view for easier column reading.
48 resize: horizontal; 46 resize: horizontal;
@@ -52,10 +50,5 @@ import { Component, Prop, Vue } from "vue-property-decorator";
52 50
53 // Re-normalise page colour. 51 // Re-normalise page colour.
54 background-color: white; 52 background-color: white;
55
56 & > iframe {
57 width: 100%;
58 height: 100%;
59 }
60} 53}
61</style> 54</style>