fix(webreader): stretched images on Safari with fit to Width

This commit is contained in:
Gauthier Roebroeck 2020-04-15 22:24:25 +08:00
parent 01c9ffe818
commit 74f9305e16

View file

@ -143,11 +143,13 @@
<img :src="getPageUrl(p)"
:height="maxHeight"
:width="maxWidth(p)"
:style="imgStyle"
/>
<img v-if="doublePages && p !== 1 && p !== pagesCount && p+1 !== pagesCount"
:src="getPageUrl(p+1)"
:height="maxHeight"
:width="maxWidth(p+1)"
:style="imgStyle"
/>
</div>
</div>
@ -412,6 +414,9 @@ export default Vue.extend({
maxHeight (): number | null {
return this.imageFit === ImageFit.HEIGHT ? this.$vuetify.breakpoint.height : null
},
imgStyle (): string {
return this.imageFit === ImageFit.WIDTH ? 'height:intrinsic' : ''
},
slidesRange (): number[] {
if (!this.doublePages) {
return this.$_.range(1, this.pagesCount + 1)