mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #2357 from thornbill/fix-epub-height
Fix epub player height
(cherry picked from commit 37bb21e347
)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
4e38caba0a
commit
fb17afad60
1 changed files with 8 additions and 8 deletions
|
@ -22,13 +22,6 @@ export class BookPlayer {
|
||||||
this.id = 'bookplayer';
|
this.id = 'bookplayer';
|
||||||
this.priority = 1;
|
this.priority = 1;
|
||||||
|
|
||||||
this.epubOptions = {
|
|
||||||
width: '100%',
|
|
||||||
height: '100%',
|
|
||||||
// TODO: Add option for scrolled-doc
|
|
||||||
flow: 'paginated'
|
|
||||||
};
|
|
||||||
|
|
||||||
this.onDialogClosed = this.onDialogClosed.bind(this);
|
this.onDialogClosed = this.onDialogClosed.bind(this);
|
||||||
this.openTableOfContents = this.openTableOfContents.bind(this);
|
this.openTableOfContents = this.openTableOfContents.bind(this);
|
||||||
this.previous = this.previous.bind(this);
|
this.previous = this.previous.bind(this);
|
||||||
|
@ -257,7 +250,14 @@ export class BookPlayer {
|
||||||
import('epubjs').then(({default: epubjs}) => {
|
import('epubjs').then(({default: epubjs}) => {
|
||||||
const downloadHref = apiClient.getItemDownloadUrl(item.Id);
|
const downloadHref = apiClient.getItemDownloadUrl(item.Id);
|
||||||
const book = epubjs(downloadHref, {openAs: 'epub'});
|
const book = epubjs(downloadHref, {openAs: 'epub'});
|
||||||
const rendition = book.renderTo('bookPlayerContainer', this.epubOptions);
|
|
||||||
|
const rendition = book.renderTo('bookPlayerContainer', {
|
||||||
|
width: '100%',
|
||||||
|
// Calculate the height of the window because using 100% is not accurate when the dialog is opening
|
||||||
|
height: document.body.clientHeight,
|
||||||
|
// TODO: Add option for scrolled-doc
|
||||||
|
flow: 'paginated'
|
||||||
|
});
|
||||||
|
|
||||||
this.currentSrc = downloadHref;
|
this.currentSrc = downloadHref;
|
||||||
this.rendition = rendition;
|
this.rendition = rendition;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue