1
0
Fork 0
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:
Fred Chasen 2017-05-09 16:42:30 -04:00 committed by GitHub
parent 042793157b
commit 2d3f1cc039
5 changed files with 51 additions and 33 deletions

View file

@ -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();

View file

@ -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;
}
}