mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
added queue to render events and displays
This commit is contained in:
parent
2d19ae683c
commit
5af9e6cd4c
11 changed files with 246 additions and 76 deletions
|
@ -172,20 +172,21 @@ EPUBJS.Hooks.register("beforeChapterDisplay").smartimages = function(callback, c
|
|||
height = oHeight || rectHeight,
|
||||
newHeight;
|
||||
|
||||
iheight = chapter.bodyEl.clientHeight;
|
||||
iheight = chapter.docEl.clientHeight;
|
||||
if(top < 0) top = 0;
|
||||
|
||||
|
||||
if(height + top >= iheight) {
|
||||
|
||||
|
||||
if(top < iheight/2) {
|
||||
newHeight = iheight - top;
|
||||
item.style.maxHeight = newHeight + "px";
|
||||
item.style.width= "auto";
|
||||
}else{
|
||||
height = (height < iheight ? height : iheight);
|
||||
newHeight = (height < iheight ? height : iheight);
|
||||
item.style.maxHeight = newHeight + "px";
|
||||
item.style.marginTop = iheight - top + "px";
|
||||
item.style.width= "auto";
|
||||
console.log(newHeight)
|
||||
}
|
||||
|
||||
item.setAttribute('data-height', newHeight);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue