mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Fix for column rendering in Safari (#614)
* Fix for column rendering in Safari * Set body to display inline in Columns css
This commit is contained in:
parent
042793157b
commit
2d3f1cc039
5 changed files with 51 additions and 33 deletions
|
@ -113,6 +113,7 @@ class ContinuousViewManager extends DefaultViewManager {
|
|||
|
||||
this._stageSize = this.stage.size(width, height);
|
||||
this._bounds = this.bounds();
|
||||
console.log("set bounds", this._bounds);
|
||||
|
||||
// Update for new views
|
||||
this.viewSettings.width = this._stageSize.width;
|
||||
|
@ -275,7 +276,7 @@ class ContinuousViewManager extends DefaultViewManager {
|
|||
var offset = horizontal ? this.scrollLeft : this.scrollTop;
|
||||
var visibleLength = horizontal ? bounds.width : bounds.height;
|
||||
var contentLength = horizontal ? this.container.scrollWidth : this.container.scrollHeight;
|
||||
|
||||
console.log(bounds);
|
||||
if (offset + visibleLength + delta >= contentLength) {
|
||||
last = this.views.last();
|
||||
next = last && last.section.next();
|
||||
|
|
|
@ -187,11 +187,11 @@ class Stage {
|
|||
}
|
||||
|
||||
bounds(){
|
||||
|
||||
if(!this.container) {
|
||||
let box = this.container && this.container.getBoundingClientRect();
|
||||
if(!box || !box.width || !box.height) {
|
||||
return windowBounds();
|
||||
} else {
|
||||
return this.container.getBoundingClientRect();
|
||||
return box;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue