Merge pull request #2646 from shortspider/ButtonsOverText
Prevent Buttons from Sitting Over Text
This commit is contained in:
commit
3919656431
2 changed files with 6 additions and 4 deletions
|
@ -267,10 +267,14 @@ export class BookPlayer {
|
||||||
const downloadHref = apiClient.getItemDownloadUrl(item.Id);
|
const downloadHref = apiClient.getItemDownloadUrl(item.Id);
|
||||||
const book = epubjs(downloadHref, {openAs: 'epub'});
|
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', {
|
const rendition = book.renderTo('bookPlayerContainer', {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
// Calculate the height of the window because using 100% is not accurate when the dialog is opening
|
height: renderHeight,
|
||||||
height: document.body.clientHeight,
|
|
||||||
// TODO: Add option for scrolled-doc
|
// TODO: Add option for scrolled-doc
|
||||||
flow: 'paginated'
|
flow: 'paginated'
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
|
|
||||||
.topButtons {
|
.topButtons {
|
||||||
z-index: 1002;
|
z-index: 1002;
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: #000;
|
color: #000;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue