mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Updates for rendering in embedded Webviews (#643)
* Initial embedding support * Updates for rendering in embedded webviews * toLowerCase nodeName check
This commit is contained in:
parent
5cc8b191d0
commit
bb1ab21a33
23 changed files with 987 additions and 213 deletions
|
@ -101,7 +101,7 @@ class Layout {
|
|||
// var fullWidth = Math.floor(_width);
|
||||
var width = _width;
|
||||
|
||||
var section = Math.floor(width / 8);
|
||||
var section = Math.floor(width / 12);
|
||||
|
||||
var colWidth;
|
||||
var spreadWidth;
|
||||
|
@ -123,7 +123,10 @@ class Layout {
|
|||
|
||||
//-- Double Page
|
||||
if(divisor > 1) {
|
||||
colWidth = (width - gap) / divisor;
|
||||
// width = width - gap;
|
||||
// colWidth = (width - gap) / divisor;
|
||||
// gap = gap / divisor;
|
||||
colWidth = (width / divisor) - gap;
|
||||
} else {
|
||||
colWidth = width;
|
||||
}
|
||||
|
@ -134,7 +137,8 @@ class Layout {
|
|||
|
||||
spreadWidth = colWidth * divisor;
|
||||
|
||||
delta = (colWidth + gap) * divisor;
|
||||
delta = width;
|
||||
// console.log(delta, width);
|
||||
|
||||
this.width = width;
|
||||
this.height = _height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue