Skip to content

Commit

Permalink
fix(webreader): webtoon reader not loading images
Browse files Browse the repository at this point in the history
closes gotson#259
  • Loading branch information
gotson committed Aug 6, 2020
1 parent cb065d7 commit 1a030b4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions komga-webui/src/components/readers/ContinuousReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:height="page.height / (page.width / $vuetify.breakpoint.width)"
:width="$vuetify.breakpoint.width"
:id="`page${page.number}`"
v-intersect.once="onIntersect"
v-intersect="onIntersect"
/>
</div>

Expand Down Expand Up @@ -105,13 +105,14 @@ export default Vue.extend({
},
onIntersect (entries: any) {
if (entries[0].isIntersecting) {
this.currentPage = parseInt(entries[0].target.id.replace('page', ''))
this.seen.splice(this.currentPage - 1, 1, true)
this.$emit('update:page', this.currentPage)
const page = parseInt(entries[0].target.id.replace('page', ''))
this.seen.splice(page - 1, 1, true)
this.currentPage = page
this.$emit('update:page', page)
}
},
shouldLoad (page: number): boolean {
return this.seen[page] || Math.abs((this.currentPage - 1) - page) <= 2
return page == 0 || this.seen[page] || Math.abs((this.currentPage - 1) - page) <= 2
},
centerClick () {
this.$emit('menu')
Expand Down

0 comments on commit 1a030b4

Please sign in to comment.