Merge pull request #2646 from shortspider/ButtonsOverText

Prevent Buttons from Sitting Over Text
This commit is contained in:
dkanada 2021-09-05 00:27:31 +09:00 committed by GitHub
commit 3919656431
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -267,10 +267,14 @@ export class BookPlayer {
const downloadHref = apiClient.getItemDownloadUrl(item.Id);
const book = epubjs(downloadHref, {openAs: 'epub'});
// We need to calculate the height of the window beforehand because using 100% is not accurate when the dialog is opening.
// In addition we don't render to the full height so that we have space for the top buttons.
const clientHeight = document.body.clientHeight;
const renderHeight = clientHeight - (clientHeight * 0.0425);
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,
height: renderHeight,
// TODO: Add option for scrolled-doc
flow: 'paginated'
});

View file

@ -11,8 +11,6 @@
.topButtons {
z-index: 1002;
position: absolute;
top: 0;
width: 100%;
color: #000;
opacity: 0.7;