mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02:00
fix(webreader): don't pad landscape covers in double page mode
This commit is contained in:
parent
4ec8f327fd
commit
352f9a8525
1 changed files with 8 additions and 2 deletions
|
|
@ -12,10 +12,16 @@ export function buildSpreads(pages: PageDtoWithUrl[], pageLayout: PagedReaderLay
|
||||||
let lastPages = undefined
|
let lastPages = undefined
|
||||||
if (pageLayout === PagedReaderLayout.DOUBLE_PAGES) {
|
if (pageLayout === PagedReaderLayout.DOUBLE_PAGES) {
|
||||||
const firstPage = pagesClone.shift() as PageDtoWithUrl
|
const firstPage = pagesClone.shift() as PageDtoWithUrl
|
||||||
spreads.push([createEmptyPage(firstPage), firstPage] as PageDtoWithUrl[])
|
if (isPageLandscape(firstPage))
|
||||||
|
spreads.push([firstPage] as PageDtoWithUrl[])
|
||||||
|
else
|
||||||
|
spreads.push([createEmptyPage(firstPage), firstPage] as PageDtoWithUrl[])
|
||||||
if (pagesClone.length > 0) {
|
if (pagesClone.length > 0) {
|
||||||
const lastPage = pagesClone.pop() as PageDtoWithUrl
|
const lastPage = pagesClone.pop() as PageDtoWithUrl
|
||||||
lastPages = [lastPage, createEmptyPage(lastPage)] as PageDtoWithUrl[]
|
if(isPageLandscape(lastPage))
|
||||||
|
lastPages = [lastPage] as PageDtoWithUrl[]
|
||||||
|
else
|
||||||
|
lastPages = [lastPage, createEmptyPage(lastPage)] as PageDtoWithUrl[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (pagesClone.length > 0) {
|
while (pagesClone.length > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue