Skip to content

Commit

Permalink
fix(webreader): stretched images on Safari with fit to Width
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson committed Apr 15, 2020
1 parent 01c9ffe commit 74f9305
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions komga-webui/src/views/BookReader.vue
Expand Up @@ -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>
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 74f9305

Please sign in to comment.